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_PLAN_RATE", indexes = {
        @Index(columnList = "SYSTEM_SYNC_STATUS"),
        @Index(columnList = "CATEGORY_CODE"),
        @Index(columnList = "CATEGORY_NAME")
})
@Api("MES_产品类别计划比例")
public class MesPartCategoryPlanRate extends BaseBean implements Serializable {

    private static final long serialVersionUID = -7815302630861503287L;

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

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

    @Column(name = "CATEGORY_NAME")
    @ApiParam(value = "产品类别名称")
    public String categoryName;

    @Column(name = "PLAN_RATE")
    @ApiParam("计划比例")
    private String planRate;

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

}
