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: MES_分时段统计方式表
 * @USER: wangjie
 * @DATE: 2023-02-03 16:11
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TIME_SEGMENT_STATISTICS", indexes = {
        @Index(columnList = "SYSTEM_SYNC_STATUS"),
        @Index(columnList = "WORK_CENTER_CODE, SHIFT_CODE")
})
@Api("MES_分时段统计方式表")
public class MesTimeSegmentStatistics extends BaseBean implements Serializable {

    private static final long serialVersionUID = 1366427224064250379L;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("工作中心代码")
    private String workCenterCode;

    @Column(name = "SHIFT_CODE")
    @ApiParam("班次")
    private String shiftCode;

    @Column(name = "START_TIME")
    @ApiParam("开始时间")
    private String startTime;

    @Column(name = "END_TIME")
    @ApiParam("结束时间")
    private String endTime;

    @Column(name = "TIME_LENGTH")
    @ApiParam("实际工作时间长度（分钟）")
    private String timeLength;

    @Column(name = "TIME_SEGMENT_CODE")
    @ApiParam("分时代码（方便统计）")
    private String timeSegmentCode;

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

