package com.qs.mp.admin.domain.param;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.TableField;
import com.qs.mp.admin.domain.GoodsSku;
import com.qs.mp.common.enums.GoodsStatusEnum;

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

import java.math.BigDecimal;
import java.util.List;

import javax.validation.constraints.NotNull;

import lombok.Data;

/**
 * @describe 商品库实体类
 * @auther quanshu
 * @create 2022-03-07 20:43:44
 */
@ApiModel(value = "添加、编辑商品参数")
@Data
public class GoodsParam {

	@ApiModelProperty(value = "商品ID", required = false)
	private Long goodsId;

	@NotNull(message = "商品名称不能为空")
	@ApiModelProperty(value = "商品名称", required = true)
	private String title;

	@ApiModelProperty(value = "商品类目ID", required = false)
	private Long categoryId;

	@ApiModelProperty("商品编码")
	private String goodsCode;

	/**
	 * 商品图片
	 */
	// @NotNull(message = "商品图片不能为空")
	@ApiModelProperty(value = "商品图片", required = true)
	private String picUrl;

	/**
	 * 详情
	 */
	@NotNull(message = "商品详情不能为空")
	@ApiModelProperty(value = "商品详情", required = true)
	private String description;

	/**
	 * 原兑换价格
	 */
	@ApiModelProperty(value = "原兑换价格", required = false)
	private Integer originPrice;

	/**
	 * 现兑换价格
	 */
	@ApiModelProperty(value = "现兑换价格", required = false)
	private Integer exchangePrice;

	/**
	 * 商品价值
	 */
	@ApiModelProperty(value = "商品价值", required = false)
	private Integer value;


	/**
	 * 商品成本
	 */
	@ApiModelProperty(value = "商品成本", required = false)
	private Integer cost;

	@ApiModelProperty("回收折扣")
	private BigDecimal discountRate;

	/**
	 * 库存数量
	 */
	@ApiModelProperty(value = "库存数量", required = false)
	private Integer quantity;

	/**
	 * 已兑换量
	 */
	@ApiModelProperty(value = "已兑换量", required = false)
	private Integer exchangedQty;

	  /**
	   * 兑换大厅是否展示，0不展示，1展示
	   */
	@NotNull(message = "兑换大厅是否展示不能为空")
	@ApiModelProperty(value = "换大厅是否展示", required = true)
	private Integer exchangeShow;

	  /**
	   * 是否多sku，0否，1是
	   */
	@NotNull(message = "是否多sku不能为空")
	@ApiModelProperty(value = "是否多sku", required = true)
	private Integer multiSku;

	/**
	 * 上架状态;上架/下架
	 */
	@ApiModelProperty(value = "上架状态", required = false)
	@JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
	private GoodsStatusEnum status;


	@ApiModelProperty(value = "商品多SKU列表", required = false)
	private List<GoodsSku> skuList;

	@ApiModelProperty(value = "商品标签ID列表", required = false)
	private List<Long> tagIds;


	@ApiModelProperty("商家信息")
	private String merchantInfo;

	@ApiModelProperty("供应商ID")
	private Long supplierId;

	@ApiModelProperty("采购链接")
	private String shoppingLink;


}
