package org.nl.acs.produceshiftorderdetail.domain;

import org.nl.acs.common.base.CommonModel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @author jiaolm
* @date 2023-05-09
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("acs_produceshiftorderdetail")
public class Produceshiftorderdetail extends CommonModel<Produceshiftorderdetail> implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "工单明细标识")
    @TableId(type= IdType.ASSIGN_ID)
    private String orderDetail_id;

    @ApiModelProperty(value = "工单明细编码")
    @NotBlank
    private String orderDetail_code;

    @ApiModelProperty(value = "工单明细类型")
    private String orderDetail_type;

    @ApiModelProperty(value = "优先级")
    private BigDecimal priority;

    @ApiModelProperty(value = "顺序号")
    private BigDecimal sequence_number;

    @ApiModelProperty(value = "工单标识")
    private String order_id;

    @ApiModelProperty(value = "工单编码")
    private String order_code;

    @ApiModelProperty(value = "客户信息")
    private String customer_name;

    @ApiModelProperty(value = "客户编码")
    private String customer_code;

    @ApiModelProperty(value = "明细状态")
    private String order_status;

    @ApiModelProperty(value = "工单数量")
    private BigDecimal order_qty;

    @ApiModelProperty(value = "刻字信息")
    private String lettering_message;

    @ApiModelProperty(value = "当前刻字数量")
    private BigDecimal present_lettering_numer;

    @ApiModelProperty(value = "贴标完成时间")
    private String labeling_finish_time;

    @ApiModelProperty(value = "创建者")
    @TableField(fill= FieldFill.INSERT)
    private String create_by;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill= FieldFill.INSERT)
    private String create_time;

    @ApiModelProperty(value = "捆扎完成时间")
    private String starp_finish_time;

    @ApiModelProperty(value = "裹膜数量")
    private BigDecimal wraping_number;

    @ApiModelProperty(value = "当前裹膜数量")
    private BigDecimal present_wraping_number;

    @ApiModelProperty(value = "裹膜合格数量")
    private BigDecimal qualified_wraping_number;

    @ApiModelProperty(value = "裹膜完成时间")
    private String wraping_finish_time;

    @ApiModelProperty(value = "贴标信息")
    private String labeling_message;

    @ApiModelProperty(value = "当前贴标数量")
    private BigDecimal present_labeling_number;

    @ApiModelProperty(value = "刻字合格数量")
    private BigDecimal qualified_lettering_numer;

    @ApiModelProperty(value = "刻字完成时间")
    private String lettering_finish_time;

    @ApiModelProperty(value = "当前套冒数量")
    private BigDecimal present_sleeveing_numer;

    @ApiModelProperty(value = "套冒合格数量")
    private BigDecimal qualified_sleeveing_number;

    @ApiModelProperty(value = "套冒完成时间")
    private String sleeveing_finish_time;

    @ApiModelProperty(value = "捆扎包数")
    private BigDecimal strap_pack_number;

    @ApiModelProperty(value = "每捆数量")
    private BigDecimal strap_number;

    @ApiModelProperty(value = "捆扎尾料数量")
    private BigDecimal strap_tailint_number;

    @ApiModelProperty(value = "捆扎直径")
    private String starp_diameter;

    @ApiModelProperty(value = "捆扎尾料直径")
    private String starp_tailint_diameter;

    @ApiModelProperty(value = "当前捆扎包数")
    private BigDecimal present_strap_pack_number;

    @ApiModelProperty(value = "修改者")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private String update_by;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private String update_time;

    @ApiModelProperty(value = "是否删除")
    @NotBlank
    private String is_deleted;

    public void copyFrom(Produceshiftorderdetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
