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: xiangming.liao
 * @Date: 2021/01/14 20:03
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PROD_DATA_TO_STATISTICS_TRAVEL", indexes = {
        @Index(columnList = "MODULE_CODE, STATISTICS_TYPE, DATA_KEY")
})
@Api("MES_生产数据统计执行记录表")
public class MesProdDataToStatisticsTravel extends BaseBean implements Serializable {

    private static final long serialVersionUID = -7012397219081625L;

    @Column(name = "MODULE_CODE")
    @ApiParam(value = "模块代码")
    private String moduleCode;

    @Column(name = "MODULE_NAME")
    @ApiParam(value = "模块名称")
    private String moduleName;

    @Column(name = "STATISTICS_TYPE")
    @ApiParam(value = "统计方式:day/month/year")
    private String statisticsType;

    @Column(name = "STATISTICS_DATE")
    @ApiParam(value = "统计日期")
    private String statisticsDate;

    @Column(name = "DATA_KEY")
    @ApiParam(value = "数据KEY")
    private String dataKey;

    @Column(name = "SOURCE_COUNT")
    @ApiParam(value = "源数据量")
    private Integer sourceCount;

    @Column(name = "TARGET_COUNT")
    @ApiParam(value = "统计数据量")
    private Integer targetCount;

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

}
