package org.dromara.ygpassport.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.ygpassport.domain.StudentList;

import java.io.Serial;
import java.io.Serializable;

@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = StudentList.class)
@NoArgsConstructor
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
public class StudentListVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 学生ID
     */
   @ExcelIgnore
    private Long id;

    /**
     * 学生姓名
     */
    @ExcelProperty(value = "学生姓名")
    private String stuName;

    /**
     * 学生性别
     */
    @ExcelProperty(value = "学生性别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_user_sex")
    private Long stuSex;

    /**
     * 学生专业
     */
    @ExcelProperty(value = "学生专业", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "stu_major")
    private Long stuMajor;

    /**
     * 学生院系
     */
    @ExcelProperty(value = "学生院系", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "faculties")
    private Long faculties;

    /**
     * 学生年级
     */
    @ExcelProperty(value = "学生年级")
    private String stuGrade;

    /**
     * 学生班级
     */
    @ExcelProperty(value = "学生班级")
    private String stuClass;

    /**
     * 培养层次
     */
    @ExcelProperty(value = "培养层次", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "stu_levels")
    private Long stuLevels;

    /**
     * 所属校区
     */
    @ExcelProperty(value = "所属校区", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "stu_campus")
    private Long stuCampus;

    /**
     * 学号
     */
    @ExcelProperty(value = "学号")
    private String stuNo;

    /**
     * 政治面貌
     */
    @ExcelProperty(value = "政治面貌")
    private String policyStatus;

    /**
     * 照片路径
     */
    private String imagePath;
}
