package com.hotwj.platform.operationManagement.hourPackage.domain.bo;

import com.hotwj.platform.operationManagement.hourPackage.domain.HotHourPackage;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;

/**
 * 学时套餐业务对象 hot_hour_package
 *
 * @author shihongwei
 * @date 2026-05-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HotHourPackage.class, reverseConvertGenerate = false)
public class HotHourPackageBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 公司ID（应用层保证必填）
     */
    private Long companyId;

    /**
     * 套餐编码
     */
    private String packageCode;

    /**
     * 套餐名称
     */
    @NotBlank(message = "套餐名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String packageName;

    /**
     * 学时类型：1=通用
     */
    private Long hourType;

    /**
     * 学时数（如1/50/100）
     */
    @NotNull(message = "学时不能为空", groups = {AddGroup.class, EditGroup.class})
    @Min(value = 1, message = "学时必须大于0", groups = {AddGroup.class, EditGroup.class})
    private Long hourCount;

    /**
     * 原价格(元)
     */
    @NotNull(message = "套餐原价格不能为空", groups = {AddGroup.class, EditGroup.class})
    @DecimalMin(value = "0.00", inclusive = false, message = "套餐原价格必须大于0", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal originPrice;

    /**
     * 单价（元）
     */
    private BigDecimal unitPrice;

    /**
     * 状态：1=启用 0=停用
     */
    @NotNull(message = "是否启用不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long status;

    /**
     * 排序号
     */
    private Long sortNo;

    /**
     * 备注
     */
    private String remark;

    /**
     * 0=正常, 1=已删除
     */
    private Long isDeleted;

    /**
     * 套餐活动价(元)
     */
    private BigDecimal packagePrice;

    /**
     * 适用类型(多选),逗号拼接
     */
    private String applicableTypes;

    /**
     * 套餐说明
     */
    private String packageDesc;


}
