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.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

import java.util.List;
/**
 * @Description:
 * @Author: jokelin
 * @Date: 2020/4/20 6:49 下午
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_BOARD_PLAN_CAPACITY")
@Api("MES_看板计划产能")
public class MesBoardPlanCapacity extends BaseBean implements Serializable {

    private static final long serialVersionUID = 7355311263972875850L;

    @Column(name = "BOARD_CODE")
    @ApiParam("看板代码")
    private String boardCode;

    @Column(name = "PLAN_DATE")
    @ApiParam("计划日期")
    private String planDate;

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

    @Column(name = "PLAN_PEOPLE_NUM")
    @ApiParam("计划人数")
    private Integer planPeopleNum;

    @Column(name = "ACTUAL_PEOPLE_NUM")
    @ApiParam("实际人数")
    private Integer actualPeopleNum;

    @Column(name = "PLAN_CAPACITY")
    @ApiParam("计划产量")
    private Integer planCapacity;

    @Column(name = "MONTH_PLAN_CAPACITY")
    @ApiParam("月计划产量")
    private Integer monthPlanCapacity;

    @Column(name = "HOUR_CAPACITY")
    @ApiParam("时段产能")
    private Integer hourCapacity;

    @Column(name = "STOP_TIME", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("停机时间")
    private Double stopTime;

    @Column(name = "ACTUAL_CAPACITY")
    @ApiParam("今日产量")
    private Integer actualCapacity;

    @Column(name = "PLAN_TAKT")
    @ApiParam("计划节拍")
    private Integer planTakt;

    @Column(name = "IS_MANUAL")
    @ApiParam("是否手工展示")
    private Integer isManual;

    @Transient
    @ApiParam("班次名称")
    private String shiftName;

    @Transient
    @ApiParam("看板时段计划产量")
    private List<MesBoardShiftSectionCap> boardShiftSectionCapacities;
}
