package com.lutao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.lutao.annotate.Validation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("prof_equipment_info")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "专业设备信息")
public class ProfEquipmentInfo extends Model<ProfEquipmentInfo> {
    private static final long serialVersionUID = 1450821647688991103L;

    @ApiModelProperty(value = "主键")
    @TableId
    private Integer id;

    @ApiModelProperty(value="原始id")
    @Validation(message = "prof_equipment_info{id}不能为空")
    private String originId;

    @ApiModelProperty(value = "appid")
    private String appId;

    @ApiModelProperty(value = "平台编码")
    @Validation(message = "prof_equipment_info{platform_code}不能为空")
    private String platformCode;

    @ApiModelProperty(value = "设施编码")
    private String facilityCode;

    @ApiModelProperty(value = "设施名称")
    private String facilityName;

    @ApiModelProperty(value = "设备名称")
    @Validation(message = "prof_equipment_info{prof_equip_name}不能为空")
    private String profEquipName;

    @ApiModelProperty(value = "设备编码")
    @Validation(message = "prof_equipment_info{prof_equip_code}不能为空")
    private String profEquipCode;

    @ApiModelProperty(value = "设备类型；1 海上结构\r\n2 采油设备\r\n3 海上锅炉和压力容器\r\n4 钻井和修井设备\r\n5 起重和升降设备\r\n6 火灾和可燃气体探测、 报警及控制系统\r\n7 安全阀\r\n8 救生设备\r\n9 消防器材\r\n10 钢丝绳等系物及被系物\r\n")
    @Validation(message = "prof_equipment_info{prof_equip_type}不能为空")
    private String profEquipType;

    @ApiModelProperty(value = "检测类型")
    @Validation(message = "prof_equipment_info{inspection_type}不能为空")
    private String inspectionType;

    @ApiModelProperty(value = "检测内容")
    @Validation(message = "prof_equipment_info{inspection_description}不能为空")
    private String inspectionDescription;

    @ApiModelProperty(value = "定检日期")
    //@Validation(message = "prof_equipment_info{periodic_inspection_date}不能为空")
    private LocalDate periodicInspectionDate;

    @ApiModelProperty(value = "年检日期")
    //@Validation(message = "prof_equipment_info{year_inspection_date}不能为空")
    private LocalDate yearInspectionDate;

    @ApiModelProperty(value = "下次定检日期")
    //@Validation(message = "prof_equipment_info{next_periodic_inspection_date}不能为空")
    private LocalDate nextPeriodicInspectionDate;

    @ApiModelProperty(value = "下次年检日期")
    //@Validation(message = "prof_equipment_info{next_year_inspection_date}不能为空")
    private LocalDate nextYearInspectionDate;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createDate;

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

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @ApiModelProperty(value = "数据收集时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
