package cn.estsh.i3plus.ext.mes.pcn.pojo.model;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.annotation.DynamicField;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import javax.persistence.*;

/**
 * @Description : 制造点检样本台账
 * @Reference :
 * @Author : junsheng.li
 * @CreateDate 2023/4/12 10:31
 * @Modify:
 **/
@Data
@Api("制造点检样本台账")
public class SxQmsPointSampleLedgerModel{

    @ApiParam(value = "管理编码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String mangagementCoding;

    @ApiParam(value = "样本名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String sampleName;

    @ApiParam(value = "样本内容")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String sampleContent;

    @ApiParam(value = "使用部门")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String useDepartment;

    @ApiParam(value = "产线代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String proLineCode;

    @ApiParam(value = "产线名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String proLineName;

    @ApiParam(value = "生效日期")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String effectiveDate;

    @ApiParam(value = "失效日期")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String expirationDate;

    @ApiParam(value = "提醒人")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String reminder;

    @ApiParam(value = "是否停线")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    @AnnoOutputColumn(refClass = CommonEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description")
    private Integer stopLine;

    @ApiParam(value = "是否有效")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    @AnnoOutputColumn(refClass = CommonEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description")
    private Integer isEffective;

    @Transient
    @ApiParam(value = "生效日期开始")
    private String effectiveDateStart;

    @Transient
    @ApiParam(value = "生效日期结束")
    private String effectiveDateEnd;

    @Transient
    @ApiParam(value = "失效日期开始")
    private String expirationDateStart;

    @Transient
    @ApiParam(value = "失效日期结束")
    private String expirationDateEnd;
}
