package com.cpop.mall.business.bo;

import com.cpop.core.annontation.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

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

/**
 * @author DB
 * @createTime 2023/10/23 12:01
 * @description
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "商城商品请求对象")
public class ProductBo implements Serializable {

    /**
     * 主键
     */
    @ApiModelProperty("主键")
    private String id;

    /**
     * 商品名
     */
    @NotBlank(message = "商品名不能为空")
    @ApiModelProperty(value = "商品名",required = true)
    private String productName;

    /**
     * 产品类型(0:课卡;1:周边;2:优惠卷:3:其他)
     */
    @NotNull(message = "产品类型不能为空")
    @ApiModelProperty(value = "产品类型(0:课卡;1:周边;2:优惠卷:3:其他)",required = true)
    private Integer productType;

    /**
     * 品牌id
     */
    @ApiModelProperty("品牌id")
    private String brandId;

    /**
     * 支付方式(微信支付:0;积分支付:1)
     */
    @ApiModelProperty("支付方式(微信支付:0;积分支付:1)")
    private Integer payType;

    /**
     * 商店(校区)集合
     */
    @StringArrayConvert
    @NotBlank(message = "商店(校区)集合不能为空")
    @ApiModelProperty("商店(校区)集合")
    private String storeIds;

    /**
     * 描述
     */
    @NotBlank(message = "描述不能为空")
    @ApiModelProperty(value = "描述",required = true)
    private String description;

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

    /**
     * 商品详情图地址
     */
    @NotBlank(message = "商品图地址不能为空")
    @ApiModelProperty(value = "商品详情图地址",required = true)
    private String picDetailUrl;

    /**
     * 购买限制(0:会员限制;1:新客限定;2:用户限购)
     */
    @ApiModelProperty("购买限制(0:会员限制;1:新客限定;2:用户限购)")
    private Integer buyRestrict;

    /**
     * 限制数量
     */
    @ApiModelProperty("限制数量")
    private Integer limitNum;

    /**
     * 旧模板id
     */
    @ApiModelProperty("旧课卡模板id")
    private String cardTemplateId;

    /**
     * 规格集合
     */
    @ApiModelProperty(value = "规格集合",required = true)
    private List<ProductSpecificationBo> specificationList;

    /**
     * 规格详情
     */
    @ApiModelProperty(value = "规格详情",required = true)
    private List<ProductRecordBo> recordList;
}
