package com.foreverwin.mesnac.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
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 java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 检验项目维护主表
 * </p>
 *
 * @author Philip
 * @since 2021-06-09
 */

@TableName("Z_INSPECTION_ITEM")

public class InspectionItem extends Model<InspectionItem> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键: 站点+检验项目编号+版本
     */
   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
    /**
     * 站点
     */
   @TableField("SITE")
   private String site;
    /**
     * 检验项目编号
     */
   @TableField("INSPECTION_ITEM_NO")
   private String inspectionItemNo;
    /**
     * 检验类型:S|首检、H｜互检、Z｜自检、P｜专检
     */
   @TableField("INSPECTION_TYPE")
   private String inspectionType;
    /**
     * 版本
     */
   @TableField("REVISION")
   private String revision;
    /**
     * 当前版本：TRUE｜当前版本、FALSE｜不是当前版本
     */
   @TableField("CURRENT_REVISION")
   private String currentRevision;
    /**
     * 检验项目描述
     */
   @TableField("DESCRIPTION")
   private String description;
    /**
     * 状态：Y｜启用、N｜停用
     */
   @TableField("STATUS")
   private String status;
    /**
     * 创建人
     */
   @TableField("CREATE_USER")
   private String createUser;
    /**
     * 创建时间
     */
   @TableField("CREATED_DATE_TIME")
   private LocalDateTime createdDateTime;
    /**
     * 修改人
     */
   @TableField("MODIFY_USER")
   private String modifyUser;
    /**
     * 修改时间
     */
   @TableField("MODIFIED_DATE_TIME")
   private LocalDateTime modifiedDateTime;
    /**
     * 检验分类
     */
   @TableField("CATEGORY")
   private String category;

   @TableField(exist = false)
   private List<InspectionItemDetail> inspectionItemDetailList;
   @TableField(exist = false)
   private List<InspectionItemAddition> inspectionItemAdditionList;


   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public String getSite() {
      return site;
   }

   public void setSite(String site) {
      this.site = site;
   }

   public String getInspectionItemNo() {
      return inspectionItemNo;
   }

   public void setInspectionItemNo(String inspectionItemNo) {
      this.inspectionItemNo = inspectionItemNo;
   }

   public String getInspectionType() {
      return inspectionType;
   }

   public void setInspectionType(String inspectionType) {
      this.inspectionType = inspectionType;
   }

   public String getRevision() {
      return revision;
   }

   public void setRevision(String revision) {
      this.revision = revision;
   }

   public String getCurrentRevision() {
      return currentRevision;
   }

   public void setCurrentRevision(String currentRevision) {
      this.currentRevision = currentRevision;
   }

   public String getDescription() {
      return description;
   }

   public void setDescription(String description) {
      this.description = description;
   }

   public String getStatus() {
      return status;
   }

   public void setStatus(String status) {
      this.status = status;
   }

   public String getCreateUser() {
      return createUser;
   }

   public void setCreateUser(String createUser) {
      this.createUser = createUser;
   }

   public LocalDateTime getCreatedDateTime() {
      return createdDateTime;
   }

   public void setCreatedDateTime(LocalDateTime createdDateTime) {
      this.createdDateTime = createdDateTime;
   }

   public String getModifyUser() {
      return modifyUser;
   }

   public void setModifyUser(String modifyUser) {
      this.modifyUser = modifyUser;
   }

   public LocalDateTime getModifiedDateTime() {
      return modifiedDateTime;
   }

   public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
      this.modifiedDateTime = modifiedDateTime;
   }

   public String getCategory() {
      return category;
   }

   public void setCategory(String category) {
      this.category = category;
   }

public static final String HANDLE = "HANDLE";

public static final String SITE = "SITE";

public static final String INSPECTION_ITEM_NO = "INSPECTION_ITEM_NO";

public static final String INSPECTION_TYPE = "INSPECTION_TYPE";

public static final String REVISION = "REVISION";

public static final String CURRENT_REVISION = "CURRENT_REVISION";

public static final String DESCRIPTION = "DESCRIPTION";

public static final String STATUS = "STATUS";

public static final String CREATE_USER = "CREATE_USER";

public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";

public static final String MODIFY_USER = "MODIFY_USER";

public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";

public static final String CATEGORY = "CATEGORY";


   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "InspectionItem{" +
         "handle = " + handle +
         ", site = " + site +
         ", inspectionItemNo = " + inspectionItemNo +
         ", inspectionType = " + inspectionType +
         ", revision = " + revision +
         ", currentRevision = " + currentRevision +
         ", description = " + description +
         ", status = " + status +
         ", createUser = " + createUser +
         ", createdDateTime = " + createdDateTime +
         ", modifyUser = " + modifyUser +
         ", modifiedDateTime = " + modifiedDateTime +
         ", category = " + category +
         "}";
   }

   public void setInspectionItemDetailList(List<InspectionItemDetail> inspectionItemDetailList) {
      this.inspectionItemDetailList = inspectionItemDetailList;
   }

   public List<InspectionItemDetail> getInspectionItemDetailList() {
      return inspectionItemDetailList;
   }

   public void setInspectionItemAdditionList(List<InspectionItemAddition> inspectionItemAdditionList) {
      this.inspectionItemAdditionList = inspectionItemAdditionList;
   }

   public List<InspectionItemAddition> getInspectionItemAdditionList() {
      return inspectionItemAdditionList;
   }
}