package com.hotwj.platform.securityManagement.trainingCourseConfig.domain.bo;

import com.hotwj.platform.securityManagement.trainingCourseConfig.domain.HotTrainingCourseConfig;
import io.github.linpeilie.annotations.AutoMapper;
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;

/**
 * 企业课程配置业务对象 hot_training_course_config
 *
 * @author shihongwei
 * @date 2026-01-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HotTrainingCourseConfig.class, reverseConvertGenerate = false)
public class HotTrainingCourseConfigBo extends BaseEntity {

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

    /**
     * 公司ID
     */
    @NotNull(message = "公司ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long companyId;

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

    /**
     * 所属课程ID
     */
    @NotNull(message = "所属课程ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long courseId;

    /**
     * 课程所属，例如: 企业/下发
     */
    private String courseBelong;

    /**
     * 学习时长，单位分钟
     */
    private Long studyDuration;

    /**
     * 排序序号，数字越小越靠前
     */
    private Long sortNo;

    /**
     * 0=正常, 1=已删除
     */
//    @NotNull(message = "0=正常, 1=已删除不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long isDeleted;

    /**
     * 培训id
     */
    private Long trainingId;

    /**
     * 创建人显示名称
     */
    private String createByName;

    /**
     * 最后修改人显示名称
     */
    private String updateByName;

    private String userId;

    /**
     * 是否跳过过期/关闭拦截（用于后台详情展示等场景）
     */
    private Boolean skipIntercept;
}
