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

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;

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.common.swagger.SchemaEnum;
import net.lab1024.sa.base.common.validator.enumeration.CheckEnum;

/**
 * 出库单 新建表单
 *
 * @Author 霍锦
 * @Date 2024-12-26 15:42:11
 * @Copyright 友仓
 */

@Data
public class PickAddForm {
    @Schema(description = "出库单号")
    private String pickNumber;

    @SchemaEnum(PickOrderStatusEnum.class)
    @CheckEnum(message = "状态", value = PickOrderStatusEnum.class)
    private String status;

    @Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "客户 不能为空")
    private Long customerId;

    @Schema(description = "客户订单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "客户订单号 不能为空")
    private String customerNumber;

    @SchemaEnum(PickOrderTypeEnum.class)
    @CheckEnum(message = "单据类型 不能为空", value = PickOrderTypeEnum.class, required = true)
    private String orderType;

    @Schema(description = "收货单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "收货单位 不能为空")
    private Long addressId;

    @Schema(description = "联系人")
    private String person;

    @Schema(description = "电话")
    private String telephone;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "订单日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单日期 不能为空")
    private LocalDate orderDate;

    @Schema(hidden = true)
    private Long createUserId;

    @Schema(hidden = true)
    private String createUserName;

}