package com.hotwj.platform.securityManagement.trainingCourseRecord.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hotwj.platform.securityManagement.trainingCourseRecord.domain.HotTrainingCourseRecord;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.json.handler.BigDecimalTwoDecimalSerializer;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 培训人员课程学习记录视图对象 hot_training_course_record
 *
 * @author shihongwei
 * @date 2026-02-02
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HotTrainingCourseRecord.class)
public class HotTrainingCourseRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    /**
     * 公司ID（由应用层保证必填）
     */
    @ExcelProperty(value = "公司ID", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "由=应用层保证必填")
    private Long companyId;

    /**
     * 培训计划ID
     */
    @ExcelProperty(value = "培训计划ID")
    private Long trainingId;

    /**
     * 培训人员ID
     */
    @ExcelProperty(value = "培训人员ID")
    private String userId;

    /**
     * 培训人员姓名
     */
    @ExcelProperty(value = "培训人员姓名")
    private String userName;

    /**
     * 课程ID
     */
    @ExcelProperty(value = "课程ID")
    private Long trainingCourseId;

    /**
     * 试卷ID
     */
    @ExcelProperty(value = "试卷ID")
    private Long examId;

    /**
     * 试卷分数
     */
    @ExcelProperty(value = "试卷分数")
    private BigDecimal examScore;

    /**
     * 检测状态：0=未完成 1=已完成
     */
    @ExcelProperty(value = "检测状态：0=未完成 1=已完成")
    private Long checkStatus;

    /**
     * 需学习时长(秒)
     */
    @ExcelProperty(value = "需学习时长(秒)")
    private Long studyDuration;

    /**
     * 学习进度百分比，如 75.50
     */
    @ExcelProperty(value = "学习进度百分比，如 75.50")
    @JsonSerialize(using = BigDecimalTwoDecimalSerializer.class)
    private BigDecimal progressRate;

    /**
     * 累计学习时长(分钟)
     */
    @ExcelProperty(value = "累计学习时长(分钟)")
    private Long learnDurationMin;

    /**
     * 完成时间
     */
    @ExcelProperty(value = "完成时间")
    private Date completeTime;

    /**
     * 学员签名OSS文件ID
     */
    @ExcelProperty(value = "学员签名OSS文件ID")
    private Long signatureOssId;

    /**
     * 是否已使用购买课时套餐：0=否 1=是
     */
    @ExcelProperty(value = "是否已使用购买课时套餐")
    private Long isUseHourPackage;

    /**
     * 已扣减课时数
     */
    @ExcelProperty(value = "已扣减课时数")
    private Long hourPackageUsedHours;

    /**
     * 创建者姓名
     */
    @ExcelProperty(value = "创建者姓名")
    private String createByName;

    /**
     * 更新者姓名
     */
    @ExcelProperty(value = "更新者姓名")
    private String updateByName;

    /**
     * 0=正常, 1=已删除
     */
    @ExcelProperty(value = "0=正常, 1=已删除")
    private Long isDeleted;


}
