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.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description:
 * @Author: xinwang.yi
 * @Date: 2023/10/12 14:03
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_MANAGE_CODE", indexes = {
        @Index(columnList = "SYSTEM_SYNC_STATUS"),
        @Index(columnList = "MANAGE_CODE"),
        @Index(columnList = "WORK_CENTER_CODE"),
        @Index(columnList = "MANAGE_CODE, WORK_CENTER_CODE"),
})
@Api("MES_管理码主表")
public class MesManageCode extends BaseBean implements Serializable {

    private static final long serialVersionUID = -4425256178641373128L;

    @Column(name = "MANAGE_CODE")
    @ApiParam(value = "管理编码")
    private String manageCode;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线代码")
    private String workCenterCode;

    @Column(name = "WORK_CENTER_NAME")
    @ApiParam("产线名称")
    private String workCenterName;

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

}
