package com.ltgk.crew.domain.dto;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltgk.common.core.page.BasePage;
import com.ltgk.common.validation.groups.Add;
import com.ltgk.common.validation.groups.Detail;
import com.ltgk.common.validation.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 培训课程信息数据传输对象
 *
 * @author Qi ChengBin
 * @date 2024/12/02 14:59:04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "培训课程信息数据传输对象", description = "培训课程信息数据传输对象")
public class DsCrewTrainInfoDTO extends BasePage {

    @ApiModelProperty(value = "主键")
    @NotNull(message = "培训课程主键信息不能为空", groups = {Update.class, Detail.class})
    private String id;

    @ApiModelProperty(value = "培训名称")
    @NotNull(message = "培训名称不能为空", groups = {Update.class, Add.class})
    private String trainName;

    @ApiModelProperty(value = "培训类型")
    @NotNull(message = "培训类型不能为空", groups = {Update.class, Add.class})
    private String trainType;

    @ApiModelProperty(value = "培训内容")
    @NotNull(message = "培训内容不能为空", groups = {Update.class, Add.class})
    private String trainContent;

    @ApiModelProperty(value = "培训结果")
    private String trainResult;

    @ApiModelProperty(value = "培训开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "培训开始时间不能为空", groups = {Update.class, Add.class})
    private Date trainStartTime;

    @ApiModelProperty(value = "培训结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "培训结束时间不能为空", groups = {Update.class, Add.class})
    private Date trainEndTime;

    @ApiModelProperty(value = "培训人")
    @NotNull(message = "培训人不能为空", groups = {Update.class, Add.class})
    private String trainer;

    @ApiModelProperty(value = "参与人数")
    @NotNull(message = "参与人数不能为空", groups = {Update.class, Add.class})
    private Integer partNum;

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

    @ApiModelProperty(value = "创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createAt;

    @ApiModelProperty(value = "编辑人")
    private String updateBy;

    @ApiModelProperty(value = "编辑日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateAt;

    @ApiModelProperty(value = "删除标志")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "培训照片：一般3张")
    @NotNull(message = "培训照片不能为空", groups = {Update.class, Add.class})
    private String photo;

    @ApiModelProperty(value = "培训视频:最少一个")
    @NotNull(message = "培训视频不能为空", groups = {Update.class, Add.class})
    private String video;

    @ApiModelProperty(value = "视频最小阅读时长")
    @NotNull(message = "视频最小阅读时长不能为空", groups = {Update.class, Add.class})
    private Integer leastReadTime;

    @ApiModelProperty(value = "行政区域编码")
    @NotNull(message = "行政区域编码不能为空", groups = {Update.class, Add.class})
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @NotNull(message = "行政区域名称不能为空", groups = {Update.class, Add.class})
    private String areaName;

    @ApiModelProperty(value = "开始时间")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;
}
