package org.dromara.main.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
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.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.main.domain.MainAbilityConfig;
import org.dromara.main.domain.MainExamEvaluation;

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

@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = MainExamEvaluation.class)
public class MainExamEvaluationVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "测评ID")
    private Long id;

    @ExcelProperty(value = "测评名称")
    private String evaluationName;

    @ExcelProperty(value = "级别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "main_position_level")
    private String grade;

    @ExcelProperty(value = "岗位")
    private String position;

    @ExcelProperty(value = "岗位类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "main_position_type")
    private String positionType;

    @ExcelProperty(value = "标签")
    private String tags;

    @ExcelProperty(value = "主图")
    private Long mainImage;

    private String mainImageUrl;

    @ExcelProperty(value = "商品相册")
    private String imageAlbum;

    @ExcelProperty(value = "详情")
    private String detail;

    @ExcelProperty(value = "价格")
    private BigDecimal price;

    @ExcelProperty(value = "上架时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date onTime;

    @ExcelProperty(value = "下架时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date downTime;

    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=草稿,1=已发布,2=已下架")
    private String status;

    private String tenantId;
    private Long createDept;
    private Long createBy;

    @ExcelProperty(value = "创建时间")
    private Date createTime;

    private Long updateBy;

    @ExcelProperty(value = "更新时间")
    private Date updateTime;

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

    @TableLogic
    private String delFlag;

    @Translation(type= TransConstant.DICT_TYPE_TO_LABEL,mapper="positionType",other="main_position_type")
    private String positionTypeLabel;

    @Translation(type= TransConstant.DICT_TYPE_TO_LABEL,mapper="grade",other="main_position_level")
    private String gradeLabel;
    /**
     * 能力配置列表
     */
    private List<MainAbilityConfig> abilityConfigs;
}
