package cn.iocoder.yudao.module.system.controller.admin.biz.vo.materialio.outbound;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 物资根据入库单生成出库单 Request VO")
@Data
public class MaterialOutboundByInboundReqVO {

    @Schema(description = "入库单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "inboundOrderId不能为空")
    private Long inboundOrderId;

    @Schema(description = "出库日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @NotNull(message = "orderDate不能为空")
    private LocalDate orderDate;

    @Schema(description = "领用部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    @NotNull(message = "outDeptId不能为空")
    private Long outDeptId;

    @Schema(description = "领用人", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "outUser不能为空")
    private String outUser;

    @Schema(description = "出库原因", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "outReason不能为空")
    private String outReason;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "租户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "tenantId不能为空")
    private Long tenantId;
}
