package com.hys.app.model.erp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hys.app.model.erp.enums.TransferTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 库存调拨VO
 *
 * @author 张崧
 * @since 2023-12-12 11:59:06
 */
@Data
public class StockTransferVO  {

    @ApiModelProperty(hidden = true)
    private Long id;


    @ApiModelProperty(name = "out_warehouse_id", value = "调出方仓库id")
    @NotNull(message = "调出方仓库id不能为空")
    private Long outWarehouseId;

    @ApiModelProperty(name = "in_warehouse_id", value = "调入方仓库id")
    @NotNull(message = "调入方仓库id不能为空")
    private Long inWarehouseId;

    @ApiModelProperty(name = "attachment", value = "附件")
    private String attachment;

    @ApiModelProperty(name = "transfer_time", value = "调拨时间")
    @NotNull(message = "调拨时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date transferTime;

    @ApiModelProperty(name = "product_list", value = "商品列表")
    @NotEmpty(message = "商品列表不能为空")
    @Valid
    private List<StockTransferProductVO> productList;

    @ApiModelProperty(name = "备注", value = "remark")
    private String  remark;

    @ApiModelProperty(name = "配送方式", value = "send_type")
    private Long  sendType;

    @ApiModelProperty(name = "备注", value = "remark")
    private TransferTypeEnum  status;

    @ApiModelProperty(name = "sn", value = "编号")
    private String sn;


}

