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

import cn.afterturn.easypoi.excel.annotation.Excel;
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.JsonPropertyDescription;
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;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 巡检任务关联信息
 * </p>
 *
 * @author 2464
 * @since 2023-10-16
 */
@Getter
@Setter
@TableName("tb_inspection_task_part")
@ApiModel(value = "TbInspectionTaskPart对象", description = "巡检任务关联信息")
public class TbInspectionTaskPart implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonPropertyDescription("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotBlank(message = "编辑时巡检信息id不能为空!",groups = {UpdateValidated.class})
    private String id;

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

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

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

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

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

    @JsonPropertyDescription("巡检项目")
    @NotBlank(message = "巡检类别不能为空！",groups = {SaveValidated.class,UpdateValidated.class})
    @Excel(name = "巡检类别",mergeVertical = true,mergeRely = {1})
    private String name;

    @JsonPropertyDescription("巡检内容")
    @NotBlank(message = "巡检内容不能为空！",groups = {SaveValidated.class,UpdateValidated.class})
    @Excel(name = "巡检内容")
    private String content;

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

    @JsonPropertyDescription("是否正常 1-正常 0-不正常")
    @Excel(name = "是否正常",dict = "yes_no")
    private String normal;

    @JsonPropertyDescription("备注")
    @Length(max = 500,message = "巡检信息备注不能超过500字符！",groups = {SaveValidated.class,UpdateValidated.class})
    @Excel(name = "备注")
    private String remark;

    @JsonPropertyDescription("巡检任务id")
    private String taskId;


}
