package com.ruoyi.ss.model.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * 车辆型号对象 et_model
 *
 * @author 邱贞招
 * @date 2024-05-13
 */
@Data
public class Model extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 型号id */
    @ApiModelProperty("型号id")
    @NotNull(message = "型号ID不允许为空", groups = {ValidGroup.Update.class})
    private Long modelId;

    /** 型号名称 */
    @Excel(name = "型号名称")
    @ApiModelProperty("型号名称")
    @NotNull(message = "型号名称不允许为空", groups = {ValidGroup.Create.class})
    private String modelName;

    /** 型号 */
    @Excel(name = "型号")
    @ApiModelProperty("型号")
    @NotNull(message = "型号不允许为空", groups = {ValidGroup.Create.class})
    private String model;

    /** 图片 */
    @Excel(name = "图片")
    @ApiModelProperty("图片")
    private String picture;

    /** 产品介绍 */
    @Excel(name = "产品介绍")
    @ApiModelProperty("硬件版本")
    @Size(max = 5000, message = "产品介绍长度不能超过5000个字符", groups = {ValidGroup.Create.class, ValidGroup.Update.class})
    private String introduce;

    @Excel(name = "标签列表")
    @ApiModelProperty("标签列表（1：蓝牙，2：WIFI，3：4G，4：GPS）")
    @NotNull(message = "标签列表不允许为空", groups = {ValidGroup.Create.class})
    @Size(min = 1, message = "至少需要一个标签", groups = {ValidGroup.Create.class})
    private List<String> tags;

    @ApiModelProperty("默认服务费类型")
//    @DictValid(type = DictTypeConstants.SERVICE_TYPE, message = "非法的服务费类型")
    private String serviceType;

    @ApiModelProperty("默认服务费")
    @Min(value = 0, message = "默认服务费不能小于0")
    private BigDecimal serviceRate;

    @ApiModelProperty("OneNet产品ID")
    @NotBlank(message = "OneNet产品ID不允许为空", groups = {ValidGroup.Create.class})
    private String productId;

    @ApiModelProperty("SN前缀")
    private String snPrefix;

    @ApiModelProperty("排序字段")
    private Integer sort;


}
