package com.cool.store.request.config;

import com.cool.store.common.InsertGroup;
import com.cool.store.common.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
public class ConfigOptionUpdateRequest {
    @ApiModelProperty("主键ID")
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty("配置类型编码")
    @NotBlank(message = "配置类型编码不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String categoryCode;

    @ApiModelProperty("配置项编码")
    @NotBlank(message = "配置项编码不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String itemCode;

    @ApiModelProperty("选项编码")
    private String optionCode;

    @ApiModelProperty("选项单位")
    private String optionUnit;

    @ApiModelProperty("选项名称")
    @NotBlank(message = "选项名称不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String optionName;

    @ApiModelProperty("选项描述")
    @NotBlank(message = "选项描述不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String optionDescription;

    @ApiModelProperty("售价")
    @NotNull(message = "售价不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private BigDecimal optionPrice;

    @ApiModelProperty("原价")
    private BigDecimal originalOptionPrice;

    @ApiModelProperty("图片")
    @NotBlank(message = "图片不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String imageUrl;
    @ApiModelProperty("视频")
    private String videoUrl;
    @ApiModelProperty("排序")
    @NotNull(message = "排序不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Integer sortOrder;
    @ApiModelProperty("配置项选项明细")
    private String optionRemark;
    @ApiModelProperty("费用类型 字典表")
    private String expenseTypeCode;
}
