package net.lab1024.sa.admin.module.business.wms.receive.asn.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.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.lab1024.sa.admin.module.business.oa.enterprise.constant.EnterpriseTypeEnum;
import net.lab1024.sa.admin.module.business.wms.receive.asn.constant.AsnOrderStatusEnum;
import net.lab1024.sa.admin.module.business.wms.receive.asn.constant.AsnOrderTypeEnum;
import net.lab1024.sa.base.module.support.datatracer.annoation.DataTracerFieldEnum;
import net.lab1024.sa.base.module.support.datatracer.annoation.DataTracerFieldLabel;

/**
 * 入库单 实体类
 *
 * @Author 霍锦
 * @Date 2025-03-26 15:10:02
 * @Copyright 友仓
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_asn")
public class AsnEntity implements Serializable {

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

    /**
     * 入库单号
     */
    @DataTracerFieldLabel("入库单号")
    private String asnNumber;

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

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

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

    /**
     * 状态
     */
    @DataTracerFieldLabel("状态")
    @DataTracerFieldEnum(enumClass = AsnOrderStatusEnum.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 receivedQuantity;

    /**
     * 订单日期
     */
    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;

}
