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

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
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.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.annotation.Query.OrderQuery;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.dict.excel.DictConverter;
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.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 * 巡检模板项目表
 * </p>
 *
 * @author 2464
 * @since 2023-09-09
 */
@Data
@TableName("tb_inspection_template_project")
@ApiModel(value = "TbInspectionTemplateProject对象", description = "巡检模板项目表")
public class TbInspectionTemplateProject implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("巡检项目")
    @NotBlank(message = "巡检项目不能为空！",groups = {SaveValidated.class, UpdateValidated.class})
    @Size(max = 64,message = "巡检项目长度不能超过64位！",groups = {SaveValidated.class,UpdateValidated.class})
    @Excel(name = "巡检项目",mergeVertical = true, mergeRely = {0})
    private String name;

    @ApiModelProperty("巡检内容")
    @NotBlank(message = "巡检内容不能为空！",groups = {SaveValidated.class,UpdateValidated.class})
    @Size(max = 64,message = "巡检内容长度不能超过64位！",groups = {SaveValidated.class,UpdateValidated.class})
    @Excel(name = "巡检内容")
    private String content;

    @ApiModelProperty("排序")
    @NotNull(message = "排序数不能为空",groups = {SaveValidated.class,UpdateValidated.class})
    private Integer sort;

    @ApiModelProperty("模板id")
    private String templateId;

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

    @ExcelIgnore
    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @OrderQuery
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date createTime;

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

    @ApiModelProperty("更新时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


}
