package net.lab1024.sa.admin.module.business.wms.shipping.pick.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import net.lab1024.sa.admin.module.business.wms.shipping.pick.constant.PickOrderStatusEnum;
import net.lab1024.sa.admin.module.business.wms.shipping.pick.constant.PickOrderTypeEnum;
import net.lab1024.sa.base.module.support.datatracer.annoation.DataTracerFieldEnum;
import net.lab1024.sa.base.module.support.datatracer.annoation.DataTracerFieldLabel;

/**
 * 出库单 实体类
 *
 * @Author 霍锦
 * @Date 2024-12-26 15:42:11
 * @Copyright 友仓
 */

@Data
@TableName("t_pick")
public class PickEntity {

    /**
     * 出库单id
     */
    @TableId(type = IdType.AUTO)
    private Long pickId;

    /**
     * 出库单号
     */
    @DataTracerFieldLabel("出库单号")
    private String pickNumber;

    /**
     * 客户
     */
    @DataTracerFieldLabel("客户")
    private Long customerId;

    /**
     * 客户订单号
     */
    @DataTracerFieldLabel("客户订单号")
    private String customerNumber;

    /**
     * 单据类型
     */
    @DataTracerFieldLabel("单据类型")
    @DataTracerFieldEnum(enumClass = PickOrderTypeEnum.class)
    private String orderType;

    /**
     * 状态
     *
     */
    @DataTracerFieldLabel("状态")
    @DataTracerFieldEnum(enumClass = PickOrderStatusEnum.class)
    private String status;

    /**
     * 收货单位
     */
    @DataTracerFieldLabel("收货单位")
    private Long addressId;

    /**
     * 联系人
     */
    @DataTracerFieldLabel("联系人")
    private String person;

    /**
     * 电话
     */
    @DataTracerFieldLabel("电话")
    private String telephone;

    /**
     * 地址
     */
    @DataTracerFieldLabel("地址")
    private String address;


    /**
     * 订单数量
     */
    private BigDecimal orderQuantity;

    /**
     * 分配数量
     */
    private BigDecimal allocatedQuantity;

    /**
     * 拣货数量
     */
    private BigDecimal pickedQuantity;

    /**
     * 发运数量
     */
    private BigDecimal shippedQuantity;

    /**
     * 订单日期
     */
    private LocalDate orderDate;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    private Long createUserId;

    /**
     * 创建人
     */
    private String createUserName;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
