package com.railway.business.catenary.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.time.LocalDate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 检查表
 *
 * @author zhaomn
 */
@Data
@ApiModel("检查表")
@EqualsAndHashCode(callSuper = true)
public class BusJcab extends BaseEntity {

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

  @ApiModelProperty(value = "部门id")
  private Long deptId;

  @ApiModelProperty(value = "所属部门")
  private String deptName;

  @ApiModelProperty(value = "线路id")
  private Long lineId;

  @ApiModelProperty(value = "线别")
  private String lineName;

  @ApiModelProperty(value = "站/区间名称")
  private String stationName;

  @ApiModelProperty(value = "站/区间ID")
  private Long stationId;

  private Long[] stationIds;

  @ApiModelProperty(value = "车间-区间站场关联id")
  private Long deptStationId;

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

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

  @ApiModelProperty(value = "检查日期")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private LocalDate checkDate;

  @ApiModelProperty(value = "检查人")
  private String checkUser;

  @ApiModelProperty(value = "检测表筛选参数 - 检查日期")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private LocalDate operationDate;

  @ApiModelProperty(value = "检测表筛选参数 - 检查人")
  private String operator;

  @ApiModelProperty(value = "确认人")
  private String confirmUser;

  @ApiModelProperty(value = "存在问题")
  @Length(max = 1000, message = "【存在问题】长度必须介于 {min} 和 {max} 之间")
  private String czwt;

  @ApiModelProperty(value = "提交状态 0未提交 1已提交 2已退回 9已确认")
  @Length(min = 1, max = 1, message = "【提交状态 0未提交 1已提交 2已退回 9已确认】长度必须介于 {min} 和 {max} 之间")
  private String submitState;

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

  @ApiModelProperty(value = "要排序的列")
  private String orderBy;

  @ApiModelProperty(value = "1-ASC 正序排序，0-DESC 倒序排序")
  private String isAsc;

}