package com.xisc.pm.domain.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 组板设计规则库(PmPdRuleItem)实体类
 *
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @since 2024-07-30 14:15:27
 */

@Getter
@Setter
@ApiModel("组板设计规则库")
@VersionAudit
@ModifyAudit
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "PM_PD_RULE_ITEM")
public class PmPdRuleItem extends AuditDomain implements Serializable {
    private static final long serialVersionUID = 672471176640097070L;

    public static final String FIELD_RULE_NO_ID = "ruleNoId";
    public static final String FIELD_RULE_NO = "ruleNo";
    public static final String FIELD_RULE_DESC = "ruleDesc";
    public static final String FIELD_VALID_FLAG = "validFlag";
    public static final String FIELD_TENANT_ID = "tenantId";
    public static final String FIELD_ATTRIBUTE1 = "attribute1";
    public static final String FIELD_ATTRIBUTE2 = "attribute2";
    public static final String FIELD_ATTRIBUTE3 = "attribute3";
    public static final String FIELD_ATTRIBUTE4 = "attribute4";
    public static final String FIELD_ATTRIBUTE5 = "attribute5";

    @ApiModelProperty("主键ID")
    @Id
    @GeneratedValue
    private Long ruleNoId;

    @ApiModelProperty(value = "规则号", required = true)
    @NotNull
    private Long ruleNo;

    @ApiModelProperty(value = "规则描述", required = true)
    @NotBlank
    private String ruleDesc;

    @ApiModelProperty(value = "生效标记", required = true)
    @NotNull
    private Long validFlag;

    @ApiModelProperty(value = "租户ID", required = true)
    @NotNull
    private Long tenantId;

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

    @Transient
    @ApiModelProperty(value = "更新人")
    private String updateByName;

    private String attribute1;

    private String attribute2;

    private String attribute3;

    private String attribute4;

    private String attribute5;

}
