package com.ruoyi.bst.model.domain;

import java.math.BigDecimal;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.interfaces.LogBizParam;
import com.ruoyi.common.core.validate.ValidGroup;

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

/**
 * 车辆型号对象 bst_model
 *
 * @author ruoyi
 * @date 2025-03-18
 */
@Data
public class Model extends BaseEntity implements LogBizParam
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "所属运营区ID")
    @ApiModelProperty("所属运营区ID")
    private Long areaId;

    @Excel(name = "所属用户ID")
    @ApiModelProperty("所属用户ID")
    @NotNull(message = "所属用户ID不允许为空", groups = {ValidGroup.Create.class})
    private Long userId;

    @Excel(name = "车型名称")
    @ApiModelProperty("车型名称")   
    @NotBlank(message = "车型名称不允许为空", groups = {ValidGroup.Create.class})
    @Size(max = 64, message = "车型名称长度不允许超过64个字符")
    private String name;

    @Excel(name = "满电电压：V")
    @ApiModelProperty("满电电压：V")
    @NotNull(message = "满电电压不允许为空", groups = {ValidGroup.Create.class})
    @Min(value = 0, message = "满电电压不允许为负数")
    private BigDecimal fullVoltage;

    @Excel(name = "亏电电压：V")
    @ApiModelProperty("亏电电压：V")
    @NotNull(message = "亏电电压不允许为空", groups = {ValidGroup.Create.class})
    @Min(value = 0, message = "亏电电压不允许为负数")
    private BigDecimal lowVoltage;

    @Excel(name = "满电续航：km")
    @ApiModelProperty("满电续航：km")
    @NotNull(message = "满电续航不允许为空", groups = {ValidGroup.Create.class})
    @Min(value = 0, message = "满电续航不允许为负数")
    private BigDecimal fullEndurance;

    @Excel(name = "低电量提醒开关")
    @ApiModelProperty("低电量提醒开关")
    @NotNull(message = "低电量提醒开关不允许为空", groups = {ValidGroup.Create.class})
    private Boolean lowBatteryReminderSwitch;

    @Excel(name = "骑行低电量提醒")
    @ApiModelProperty("骑行低电量提醒")
    @Min(value = 0, message = "骑行低电量提醒不能小于0")
    private Integer lowBatteryReminder;

    @Excel(name = "是否允许用户打开坐垫锁")
    @ApiModelProperty("是否允许用户打开坐垫锁") 
    private Boolean enableSeat;

    @Override
    public Object logBizId() {
        return id;
    }

}
