package com.casic.missiles.model.meter;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
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 javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 计量管理-培训管理-培训计划表
 * </p>
 *
 * @author wangpeng
 * @since 2022-11-23
 */
@ColumnWidth(30)
@HeadRowHeight(15)
@ContentRowHeight(20)
@ContentStyle(borderLeft = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN)
@ExcelIgnoreUnannotated
@ApiModel
@Data
@TableName("meter_train_plan")
public class MeterTrainPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    @ApiModelProperty(value = "主键id（列表、更新接口参数）", dataType = "Long", required = true)
    private Long id;

    /**
     * 培训计划编号
     */
    @ExcelProperty("计划编号")
    @ApiModelProperty(value = "培训计划编号（列表、更新接口参数）", dataType = "String")
    @TableField("plan_no")
    private String planNo;

    /**
     * 培训计划名称
     */
    @ExcelProperty("培训名称")
    @ApiModelProperty(value = "培训名称", dataType = "String", required = true)
    @NotBlank(message = "培训名称不能为空")
    @TableField("plan_name")
    private String planName;

    /**
     * 培训对象
     */
    @ExcelProperty("培训对象")
    @ApiModelProperty(value = "培训对象", dataType = "String", required = true)
    @NotBlank(message = "培训对象不能为空")
    @TableField("train_person")
    private String trainPerson;

    /**
     * 培训人数
     */
    @ExcelProperty("培训人数")
    @ApiModelProperty(value = "培训人数", dataType = "Integer")
    @TableField("train_number")
    private Integer trainNumber;

    /**
     * 培训时间
     */
    @ExcelProperty("培训时间")
    @ApiModelProperty(value = "培训时间", dataType = "String")
    @TableField("train_time")
    private String trainTime;

    /**
     * 培训学时
     */
    @ExcelProperty("培训学时")
    @ApiModelProperty(value = "培训学时", dataType = "String")
    @TableField("train_hour")
    private String trainHour;

    /**
     * 组织部门id-系统组织表
     */
    @ApiModelProperty(value = "组织部门id-系统组织表", dataType = "Long")
    @TableField("dept_id")
    private Long deptId;

    @ExcelProperty("主管部门")
    @ApiModelProperty(value = "主管部门(列表接口参数)", dataType = "String")
    @TableField(exist = false)
    private String deptName;

    /**
     * 实施单位-手填
     */
    @ExcelProperty("实施单位")
    @ApiModelProperty(value = "实施单位-手填", dataType = "String")
    @TableField("effective_company")
    private String effectiveCompany;

    /**
     * 负责人-人员名字
     */
    @ExcelProperty("负责人")
    @ApiModelProperty(value = "负责人-人员名字", dataType = "String")
    @TableField("director")
    private String director;

    /**
     * 培训地点
     */
    @ExcelProperty("培训地点")
    @ApiModelProperty(value = "培训地点", dataType = "String")
    @TableField("train_address")
    private String trainAddress;

    /**
     * 培训内容
     */
    @ExcelProperty("培训内容")
    @ApiModelProperty(value = "培训内容", dataType = "String")
    @TableField("train_content")
    private String trainContent;

    /**
     * 备注
     */
    @ExcelProperty("备注")
    @ApiModelProperty(value = "备注", dataType = "String")
    @TableField("remark")
    private String remark;

    /**
     * 流程实例id
     */
    @ApiModelProperty(value = "流程实例id（未通过培训计划编辑接口必传参数）", dataType = "String")
    @TableField("process_id")
    private String processId;

    /**
     * 审批状态-字典code
     */
    @ApiModelProperty(hidden = true)
    @TableField("approval_status")
    private String approvalStatus;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String approvalStatusName;

    @ApiModelProperty(hidden = true)
    @TableField("create_user_id")
    private Long createUserId;

    /**
     * 删除标记
     */
    @ApiModelProperty(hidden = true)
    @TableField("is_del")
    private Integer isDel;

    /**
     * 创建时间
     */
    @ExcelProperty("创建时间")
    @ApiModelProperty(value = "创建时间（列表接口参数）", dataType = "String")
    @TableField("create_time")
    private String createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(hidden = true)
    @TableField("update_time")
    private String updateTime;

    @NotEmpty(message = "培训人员不能为空")
    @ApiModelProperty(value = "培训人员", dataType = "List")
    @TableField(exist = false)
    private List<MeterTrainStaff> trainStaffList;

}
