package cn.estsh.i3plus.ext.mes.pojo.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Description:
 * @Author: wangjie
 * @Date: 2021/01/14 20:03
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PART_CATEGORY_TARGET_CFG", indexes = {
        @Index(columnList = "SYSTEM_SYNC_STATUS"),
        @Index(columnList = "CATEGORY_CODE"),
        @Index(columnList = "DATA_KEY")
})
@Api("MES_产品类别目标配置")
public class MesPartCategoryTargetCfg extends BaseBean implements Serializable {

    private static final long serialVersionUID = 6624732074101716090L;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam(value = "系统同步标志")
    public Integer systemSyncStatus = 2;

    @Column(name = "CATEGORY_CODE")
    @ApiParam(value = "产品类别代码")
    public String categoryCode;

    @Column(name = "DATA_KEY")
    @ApiParam(value = "配置键")
    public String dataKey;

    @Column(name = "CFG_VALUE")
    @ApiParam("目标")
    private String cfgValue;

    @Column(name = "CFG_VALUE2")
    @ApiParam("目标2")
    private String cfgValue2;

    @Column(name = "RATE")
    @ApiParam("比例")
    private String rate;

    @Transient
    @ApiParam("ID")
    private String idStr;

    @Transient
    @ApiParam("产品类别")
    private String categoryName;

}
