package com.gci.boot.modules.customer.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.validated.SaveValidated;
import com.gci.boot.common.validated.UpdateValidated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 定时任务记录表
 * </p>
 *
 * @author 2464
 * @since 2023-10-18
 */
@Getter
@Setter
@TableName("tb_scheduled_plan")
@ApiModel(value = "TbScheduledPlan对象", description = "定时任务记录表")
public class TbScheduledPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotBlank(message = "编辑时id不能为空！",groups = {UpdateValidated.class})
    private String id;

    @ApiModelProperty("所属机构")
    private String sysOrgCode;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("更新人")
    private String updateBy;

    @ApiModelProperty("cron表达式")
    private String cronExpression;

    @ApiModelProperty("频率类型标识")
    @Dict(dicCode = "frequency_type")
    @NotBlank(message = "频率不能为空！",groups = {SaveValidated.class})
    private String frequencyType;

    @ApiModelProperty("关联项目")
    @NotBlank(message = "项目不能为空！",groups = {SaveValidated.class})
    private String projectId;

    /**
     * 定时任务类型 1-客户回访 2-巡检任务
     */
    @ApiModelProperty("定时任务类型 1-客户回访 2-巡检任务")
    private String planType;

    /**
     * 模板id
     */
    @ApiModelProperty("模板id")
    @Length(max = 32,message = "模板标识错误！",groups = {SaveValidated.class})
    private String templateId;
}
