package cn.estsh.i3plus.pojo.mes.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.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description :mes-pcn定时任务工作清单同步记录
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-08-27
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PCN_TASK_LOG")
@Api("mes-pcn定时任务工作清单同步记录")
public class MesPcnTaskLog extends BaseBean implements Serializable {

    private static final long serialVersionUID = 1175730596573636224L;
    @Column(name = "SYNC_TIME_START")
    @ApiParam("同步数据开始时间")
    private String syncTimeStart;

    @Column(name = "SYNC_TIME_END")
    @ApiParam("同步数据截止时间")
    private String syncTimeEnd;

    @Column(name = "SYNC_STATUS")
    @ApiParam("同步状态")
    private Integer syncStatus;

    @Column(name = "ERROR_CONTENT")
    @ApiParam("异常内容")
    private Long errorContent;

    public int getSyncStatusVal() {
        return this.syncStatus == null ? 0 : this.syncStatus;
    }
}
