package com.railway.business.safetool.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.railway.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
/**
 * 安全工具-基础数据
 * @author wuhonghao 2021-12-01
 */
@Data
@ApiModel("安全工具-基础数据")
@EqualsAndHashCode(callSuper = true)
public class BaseSafetyTool extends BaseEntity{

    @ApiModelProperty(value = "主键", hidden = true)
    private Long toolId;

    @ApiModelProperty(value = "车间id")
    private Long deptId;

    @ApiModelProperty(value = "车间名称")
    private String deptName;

    @ApiModelProperty(value = "存放处所")
    @Length(min = 1, max = 100, message = "【存放处所】长度必须介于 {min} 和 {max} 之间")
    private String storePlace;

    @ApiModelProperty(value = "名称")
    @Length(min = 1, max = 100, message = "【名称】长度必须介于 {min} 和 {max} 之间")
    private String toolName;

    @ApiModelProperty(value = "类型(名称字典)")
    @Length(min = 1, max = 10, message = "【类型(名称字典)】长度必须介于 {min} 和 {max} 之间")
    private String toolType;

    @ApiModelProperty(value = "编号")
    @Length(min = 1, max = 50, message = "【编号】长度必须介于 {min} 和 {max} 之间")
    private String toolCode;

    @ApiModelProperty(value = "电压等级")
    @Length(min = 1, max = 10, message = "【电压等级】长度必须介于 {min} 和 {max} 之间")
    private String elecLevel;

    @ApiModelProperty(value = "单位")
    @Length(min = 1, max = 10, message = "【单位】长度必须介于 {min} 和 {max} 之间")
    private String unit;

    @ApiModelProperty(value = "试验周期")
    private Integer testCycle;

    @ApiModelProperty(value = "试验周期")
    private String testCycleText;

    @ApiModelProperty(value = "上次试验日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date lastTestDate;

    @ApiModelProperty(value = "下次试验日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date nextTestDate;

    @ApiModelProperty(value = "试验结果(0:失败1：成功)")
    @Length(min = 1, max = 1, message = "【试验结果(0:失败1：成功)】长度必须介于 {min} 和 {max} 之间")
    private String testResult;

    @ApiModelProperty(value = "实际试验时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date testDate;

    @ApiModelProperty(value = "试验结果描述")
    @Length(min = 1, max = 255, message = "【试验结果描述】长度必须介于 {min} 和 {max} 之间")
    private String testResultDesc;

    @ApiModelProperty(value = "状态 0：报废 1：正常")
    @Length(min = 1, max = 1, message = "【状态 0：报废 1：正常】长度必须介于 {min} 和 {max} 之间")
    private String state;

    @ApiModelProperty(value = "报废原因")
    @Length(min = 1, max = 255, message = "【报废原因】长度必须介于 {min} 和 {max} 之间")
    private String scrapReason;

    @ApiModelProperty(value = "报废时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date scrapDate;

    @ApiModelProperty(value = "报废操作人")
    @Length(min = 1, max = 20, message = "【报废操作人】长度必须介于 {min} 和 {max} 之间")
    private String scrapUser;

    @ApiModelProperty(value = "车间id")
    private Long replaceToolId;

    @ApiModelProperty(value = "生产厂家")
    @Length(min = 1, max = 100, message = "【生产厂家】长度必须介于 {min} 和 {max} 之间")
    private String produceFactory;

    @ApiModelProperty(value = "生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date produceDate;

    @ApiModelProperty(value = "del_flag")
    @Length(min = 1, max = 1, message = "【del_flag】长度必须介于 {min} 和 {max} 之间")
    private String delFlag;

    public BaseSafetyTool() {
    }

}