package com.izouma.wenlvju.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.izouma.wenlvju.annotations.EnumFormat;
import com.izouma.wenlvju.enums.CompetitionGroup;
import com.izouma.wenlvju.utils.excel.EnumExcelConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "Programme")
public class ProgUploadDTO {

    @ExcelProperty(value = "节目名称")
    private String name;

    @ExcelProperty(value = "参赛专业")
    private String specialty;

    @EnumFormat(value = CompetitionGroup.class,
            fromExcel = {"个人", "集体"},
            toJavaEnum = {"SINGLE", "COLLECTIVE"})
    @ExcelProperty(value = "参赛组别", converter = EnumExcelConverter.class)
    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "参赛组别")
    private CompetitionGroup competitionGroup;

    @ExcelProperty(value = "参赛级别")
    private String level;

    @ExcelProperty(value = "作品时长")
    private int durationOfWork;

    @ExcelProperty(value = "指导老师")
    private String instructor;

    @ApiModelProperty(value = "指导老师电话")
    private String instructorPhone;

    @ExcelProperty(value = "参赛视频")
    private String video;

    @ExcelProperty(value = "考级机构")
    private String gradingOrganization;

    @ExcelProperty(value = "承办单位")
    private String organization;

    @ExcelProperty(value = "考级点")
    private String examPoint;

    @ExcelProperty(value = "联系人")
    private String contact;

    @ExcelProperty(value = "联系电话")
    private String phone;

    @ExcelProperty(value = "参赛人数")
    private int quantity;

    @ExcelProperty(value = "参赛人员姓名")
    private String participantName;

    @ExcelProperty(value = "参赛人员性别")
    private String participantSex;

    @ExcelProperty(value = "参赛人员出生年月")
    private String participantBirthday;

    @ExcelProperty(value = "参赛人员联系方式")
    private String participantPhone;

    @ExcelProperty(value = "证件号码")
    @ApiModelProperty(value = "证件号码")
    private String idNo;

    @ExcelProperty(value = "证件照")
    private String img;

    @ExcelProperty(value = "考级证书")
    private String certificate;
}
