package com.sy.coinage.workshop.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

import com.alibaba.fastjson2.annotation.JSONField;

/**
 * -发货单主表实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)

@TableName("rfid_delivery")
@ApiModel(value = "发货单主表对象", description = "发货单主表")
public class Delivery implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * -id -10
     */
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * -发货单号 -20
     */
    @ApiModelProperty(value = "发货单号")
    @TableField(value = "order_no")
    private String orderNo;
    /**
     * -拍数-计划 -10
     */
    @ApiModelProperty(value = "拍数-计划")
    @TableField(value = "plan_par")
    private Integer planPar;
    /**
     * -零箱数-计划 -10
     */
    @ApiModelProperty(value = "零箱数-计划")
    @TableField(value = "plan_box_num")
    private Integer planBoxNum;
    /**
     * -合计总箱数（冗余字端） -10
     */
    @ApiModelProperty(value = "合计总箱数（冗余字端）")
    @TableField(value = "plan_total_box")
    private Integer planTotalBox;
    /**
     * -发货地址ID -10
     */
    @ApiModelProperty(value = "发货地址ID")
    @TableField(value = "address_id")
    private Integer addressId;
    /**
     * -发货地址名称 -255
     */
    @ApiModelProperty(value = "发货地址名称")
    @TableField(value = "address_cn")
    private String addressCn;
    /**
     * -发货单创建时间 -19
     */
    @ApiModelProperty(value = "发货单创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * -创建者ID -10
     */
    @ApiModelProperty(value = "创建者ID")
    @TableField(value = "create_id")
    private Integer createId;
    /**
     * -创建者姓名 -20
     */
    @ApiModelProperty(value = "创建者姓名")
    @TableField(value = "create_by")
    private String createBy;
    /**
     * -操作人ID -10
     */
    @ApiModelProperty(value = "操作人ID")
    @TableField(value = "operator_id")
    private Integer operatorId;
    /**
     * -操作人名称（付出人1） -20
     */
    @ApiModelProperty(value = "操作人名称（付出人1）")
    @TableField(value = "operator")
    private String operator;
    /**
     * -复核人ID -10
     */
    @ApiModelProperty(value = "复核人ID")
    @TableField(value = "check_id")
    private Integer checkId;
    /**
     * -复核人（付出人2） -20
     */
    @ApiModelProperty(value = "复核人（付出人2）")
    @TableField(value = "checker")
    private String checker;
    /**
     * -发货单-确认发货时间 -19
     */
    @ApiModelProperty(value = "发货单-确认发货时间")
    @TableField(value = "updated")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updated;

    @ApiModelProperty(value = "发货单状态  1:初始化 2 已发货")
    @TableField(value = "status")
    private Integer status;

    @ApiModelProperty(value = "发货时间")
    @TableField(value = "delivery_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    @ApiModelProperty(value = "品名id")
    @TableField(value = "securities_id")
    private Integer securitiesId;

    @ApiModelProperty(value = "品名")
    @TableField(value = "securities")
    private String securities;

    @ApiModelProperty(value = "明细集合")
    @TableField(select = false, exist = false)
    List<DeliveryDetail> detailList;
}
