package com.sifang.modules.supply.order.request;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.Valid;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author hongzq
 */
public class DeliverReq implements Serializable {

    /**
     * 发货仓库id
     */
    //@NotBlank(message = "发货仓库不能为空")
    private String outWarehouseId;

    /**
     * 发货方式
     */
    @NotBlank(message = "发货方式不能为空")
    private String deliverMethodId;

    /**
     * 物流单号，当发货方式是快递物流的时候必传
     */
    private String expressNo;

    /**
     * 司机
     */
    private String deliverDriver;

    /**
     * 联系方式
     */
    private String deliverMobile;

    /**
     * 车牌号
     */
    private String deliverCarNum;

    /**
     * 发货说明
     */
    private String deliverRemark;

    /**
     * 标记：1.发货 2.暂存
     */
    @Pattern(regexp = "^[12]$", message = "type格式不正确")
    private String type;

    /**
     * 发货单
     */
    private String deliveryVoucher;

    /**
     * 发货接货单
     */
//    @NotBlank(message = "接货单不能为空")
//    private String deliverInvoice;

    @Valid
    private TraderOrderReq materialInfo;

    public String getOutWarehouseId() {
        return outWarehouseId;
    }

    public void setOutWarehouseId(String outWarehouseId) {
        this.outWarehouseId = outWarehouseId;
    }

    public String getDeliverMethodId() {
        return deliverMethodId;
    }

    public void setDeliverMethodId(String deliverMethodId) {
        this.deliverMethodId = deliverMethodId;
    }

    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }

//    public String getDeliverInvoice() {
//        return deliverInvoice;
//    }
//
//    public void setDeliverInvoice(String deliverInvoice) {
//        this.deliverInvoice = deliverInvoice;
//    }

    public String getDeliverDriver() {
        return deliverDriver;
    }

    public void setDeliverDriver(String deliverDriver) {
        this.deliverDriver = deliverDriver;
    }

    public String getDeliverMobile() {
        return deliverMobile;
    }

    public void setDeliverMobile(String deliverMobile) {
        this.deliverMobile = deliverMobile;
    }

    public String getDeliverCarNum() {
        return deliverCarNum;
    }

    public void setDeliverCarNum(String deliverCarNum) {
        this.deliverCarNum = deliverCarNum;
    }

    public String getDeliverRemark() {
        return deliverRemark;
    }

    public void setDeliverRemark(String deliverRemark) {
        this.deliverRemark = deliverRemark;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public TraderOrderReq getMaterialInfo() {
        return materialInfo;
    }

    public void setMaterialInfo(TraderOrderReq materialInfo) {
        this.materialInfo = materialInfo;
    }

    public String getDeliveryVoucher() {
        return deliveryVoucher;
    }

    public void setDeliveryVoucher(String deliveryVoucher) {
        this.deliveryVoucher = deliveryVoucher;
    }
}
