package com.ruoyi.mall.domain.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * app-线下订单对象 MallAppOrderOrderDTO
 *
 * @author ruoyi
 * @date 2024-06-29
 */
@Setter
@Getter
@ToString
public class MallAppOrderOrderDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    public interface addMallAppOrderOrderDTO {
    }

    public interface updateMallAppOrderOrderDTO {
    }

    public interface deleteMallAppOrderOrderDTO {
    }

    public interface cancelMallAppOrderOrderDTO {
    }

    public interface uploadOrderPayProofDTO {
    }

    public interface adminExamineOrderDTO {
    }

    public interface warehouseManageOrderDTO {
    }

    public interface uploadOrderCarVideoDTO {
    }

    public interface financeExamineOrderDTO {
    }

    /**
     * 线下订单主键ID
     */
    @NotNull(message = "订单ID不能为空", groups = {updateMallAppOrderOrderDTO.class, deleteMallAppOrderOrderDTO.class, cancelMallAppOrderOrderDTO.class, uploadOrderPayProofDTO.class, adminExamineOrderDTO.class, warehouseManageOrderDTO.class, uploadOrderCarVideoDTO.class, financeExamineOrderDTO.class})
    private Long id;

    /**
     * 订单类型：3-线下订单
     */
    @NotNull(message = "订单类型不能为空", groups = {updateMallAppOrderOrderDTO.class, deleteMallAppOrderOrderDTO.class, cancelMallAppOrderOrderDTO.class, uploadOrderPayProofDTO.class, adminExamineOrderDTO.class, warehouseManageOrderDTO.class, uploadOrderCarVideoDTO.class, financeExamineOrderDTO.class})
    private Integer orderType;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = {updateMallAppOrderOrderDTO.class, deleteMallAppOrderOrderDTO.class, cancelMallAppOrderOrderDTO.class, adminExamineOrderDTO.class, warehouseManageOrderDTO.class, uploadOrderCarVideoDTO.class, financeExamineOrderDTO.class})
    private Long sysUserId;

    /**
     * 下单人ID
     */
    @NotNull(message = "请选择下单人", groups = {addMallAppOrderOrderDTO.class})
    private Long orderUserId;

    /**
     * 业务员ID
     */
    @NotNull(message = "请选择业务员", groups = {addMallAppOrderOrderDTO.class, updateMallAppOrderOrderDTO.class})
    private Long salesmanId;

    /**
     * 寄件人地址ID
     */
    private Long senderAddressId;

    /**
     * 收件人地址ID
     */
    @NotNull(message = "请选择收件人地址", groups = {addMallAppOrderOrderDTO.class, updateMallAppOrderOrderDTO.class})
    private Long receiverAddressId;

    /**
     * 是否支付：0-未支付，1-已支付
     */
    @NotBlank(message = "请选择是否支付", groups = {addMallAppOrderOrderDTO.class})
    private String isPay;

    /**
     * 订单原价
     */
    private BigDecimal orderPrice;

    /**
     * 商品总件数
     */
    private String goodsNum;

    /**
     * 提成金额
     */
    private BigDecimal commissionPrice;

    /**
     * 支付凭证
     */
    @NotNull(message = "支付凭证不能为空", groups = {uploadOrderPayProofDTO.class})
    private String payProof;

    /**
     * 装车视频
     */
    @NotNull(message = "装车视频不能为空", groups = {uploadOrderCarVideoDTO.class})
    private String carVideo;

    /**
     * 相关人员ID
     */
    private Long resId;

    /**
     * 备注
     */
    private String remarks;

    /**
     * app-线下订单商品列表
     */
    @NotEmpty(message = "请添加商品", groups = {addMallAppOrderOrderDTO.class, updateMallAppOrderOrderDTO.class})
    private List<MallAppOrderGoodsDTO> appOrderGoodsDTOList;

}
