package com.kiisoo.ic.activity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 */
@Data
@TableName ("pmn_activity_promotion_param")
@ApiModel("活动类型")
public class PmnActivityPromotionParam {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "传入则编辑,不传则新增")
    private Long id;
    @ApiModelProperty(hidden = true)
    private Long promotionId;
    @ApiModelProperty(hidden = true)
    private Integer attr;

    @NotBlank(message = "请输入活动类型名称")
    @ApiModelProperty(value = "活动类型名称", required = true)
    private String name;

    @NotBlank(message = "请输入参数")
    @ApiModelProperty(value = "参数", required = true)
    @TableField("`key`")
    private String key;

    @ApiModelProperty(value = "是否必填")
    private Integer isRequired;

    @NotBlank(message = "请选择值类型:  1、数值 2、字串 3、日期")
    @ApiModelProperty(value = "值类型,1、数值 2、字串 3、日期", required = true, notes = "1、数值 2、字串 3、日期")
    private Integer type;

    @ApiModelProperty(value = "上限")
    private String limitUpper;

    @ApiModelProperty(value = "下限")
    private String limitLower;

    @NotBlank(message = "请输入默认值")
    @ApiModelProperty(value = "默认值", required = true)
    private String defaultVal;

    @NotBlank(message = "请输入说明")
    @ApiModelProperty(value = "说明", required = true)
    private String description;
}
