package com.sz.admin.teacher.pojo.vo;

import cn.idev.excel.annotation.ExcelIgnore;
import cn.idev.excel.annotation.ExcelProperty;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.core.handler.JacksonTypeHandler;
import com.sz.excel.annotation.CellMerge;
import com.sz.excel.annotation.DictFormat;
import com.sz.core.common.entity.UploadResult;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * TeacherStatistics查询返回
 * </p>
 *
 * @author sz-admin
 * @since 2024-06-19
 */
@Data
@Schema(description = "TeacherStatistics返回vo")
public class TeacherStatisticsVO {

    @ExcelIgnore
    @Schema(description = "id")
    private Long id;

    @ExcelProperty(value = "统计年限")
    @Schema(description = "统计年限")
    private String year;

    @ExcelProperty(value = "统计月份")
    @Schema(description = "统计月份")
    private String month;

    @ExcelProperty(value = "统计年月")
    @Schema(description = "统计年月")
    @CellMerge
    private String duringTime;

    @ExcelProperty(value = "教师id")
    @Schema(description = "教师id")
    private String teacherId;

    @ExcelProperty(value = "讲师区分类型")
    // 如果字典使用的是别名 使用如下设置 useAlias = true
    // @DictFormat(dictType = "account_status", isSelected = true, useAlias = true)
    @Schema(description = "讲师区分类型")
    private Integer teacherCommonType;

    @ExcelProperty(value = "授课总数")
    @Schema(description = "授课总数")
    private Integer totalTeaching;

    @ExcelProperty(value = "服务班次数")
    @Schema(description = "服务班次数")
    private Integer totalClassCount;

    @ExcelProperty(value = "课时总数")
    @Schema(description = "课时总数")
    private BigDecimal totalHours;

    @ExcelProperty(value = "核对状态")
    @Schema(description = "核对状态")
    @DictFormat(dictType = "account_status")
    private Integer checkStatus;

    @ExcelProperty(value = "核对时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "核对时间")
    private LocalDateTime checkTime;

    @ExcelProperty(value = "最近一次同步时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "最近一次同步时间")
    private LocalDateTime lastSyncTime;

    @ExcelProperty(value = "备注")
    @Schema(description = "备注")
    private String remark;

    @ExcelProperty(value = "创建人")
    @DictFormat(dictType = "dynamic_user_options")
    @Schema(description = "创建人")
    private Long createId;

    @ExcelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @ExcelProperty(value = "更新人")
    @DictFormat(dictType = "dynamic_user_options")
    @Schema(description = "更新人")
    private Long updateId;

    @ExcelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @ExcelIgnore
    @Schema(description = "文件地址(JSON)")
    @Column(typeHandler = JacksonTypeHandler.class)
    private List<UploadResult> url;

    @ExcelIgnore
    @Schema(description = "内容html")
    private String contentHtml;

    @Data
    public static class TeacherTypeEnum {

        private long id;

        private String teacherId;

    }

}