/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.api.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 请求实体类
 *
 * @author BladeX
 * @since 2022-02-13
 */
@Data
@ApiModel(value = "新增订单实体对象", description = "请求实体类")
public class SubmitOrderRequest implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "购物车ID")
	private Long shoppingCartId;

	@ApiModelProperty(value = "用户收货地址id")
	private Long userAddressId;

	@ApiModelProperty(value = "配送方式;1-快递 2-自取")
	private Integer distributeMode;

	@ApiModelProperty(value = "运费")
	private Double wlPrice;

	@NotNull(message = "订单类型不能为空")
	@ApiModelProperty(value = "订单类型 1-拼团订单")
	private Integer orderType;

	@NotNull(message = "订单来源不能为空")
	@ApiModelProperty(value = "订单来源 1-小程序")
	private Integer orderSource;

	@ApiModelProperty(value = "商品ID")
	private Long goodsInfoId;

	@ApiModelProperty(value = "商品数量")
	private Integer goodsNum;

	@ApiModelProperty(value = "商品规格ID")
	private Long goodsSpecId;

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

	@ApiModelProperty(value = "用户优惠券ID")
	private Long couponUserId;

	@ApiModelProperty(value = "商标ID")
	private Long trademarkId;

	@ApiModelProperty(hidden = true)
	private Long userId;

	@ApiModelProperty(value = "商品列表")
	private List<Goods> goodsInfos;

	@ApiModelProperty(value = "团购ID")
	private Long grouponId;

	@ApiModelProperty(value = "自提点ID")
	private Long selfTakeId;

	@ApiModelProperty(value = "设备id")
	private Long deviceId;

	@ApiModelProperty(value = "门店id")
	private Long shopId;

	@ApiModelProperty(value = "货道id")
	@NotNull(message = "货道id不能为空")
	private Long cargoWayId;

	@ApiModelProperty(value = "货道编号")
	@NotBlank(message = "货道编号不能为空")
	private String cargoWayNo;

}
