package com.yida.data.common.core.entity.exam;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;

/**
 * 考试管理 Entity
 *
 * @author zhanghaijun
 * @date 2021-06-22 10:20:45
 */
@Data
@TableName("core_examination")
public class CoreExamination {

    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     *
     */
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     *
     */
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     *
     */
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     *
     */
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     *
     */
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 本次考试名称
     */
    @TableField("name")
    private String name;

    /**
     * 考试开始时间
     */
    @TableField("start_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    /**
     * 考试结束时间
     */
    @TableField("end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    /**
     * 考试类型id
     */
    @TableField("type")
    private Long type;

    /**
     * 学校主键ID
     */
    @TableField("school_id")
    private Long schoolId;

    /**
     * 学校名称
     */
    @TableField("school_name")
    private String schoolName;

    /**
     * 年级主键ID
     */
    @TableField("grade_id")
    private Long gradeId;

    /**
     * 年级名称
     */
    @TableField("grade_name")
    private String gradeName;

    /**
     * 本次考试的总分
     */
    @TableField("score")
    private Double score;

    /**
     * 考试成绩是否发布（1=是，0=否）
     */
    @TableField("publish")
    private String publish;

    /**
     * 学区,关联deptId
     */
    @TableField("school_district")
    private Long schoolDistrict;

    /**
     * 学区名字
     */
    @TableField("school_district_name")
    private String schoolDistrictName;

    /**
     * 学段,关联deptId
     */
    @TableField("school_paragraph")
    private Long schoolParagraph;

    /**
     * 学段名字
     */
    @TableField("school_paragraph_name")
    private String schoolParagraphName;

    /**
     * 学生id
     */
    @TableField(exist = false)
    private Long studentId;

    /**
     * 针对本次考试是否缺考
     * 1=是，0=否
     */

    @TableField(exist = false)
    private String examineMiss;

    /**
     * 本次考试的科目数量
     */

    @TableField(exist = false)
    private Integer courseCount;

    /**
     * 类型名称
     */

    @TableField(exist = false)
    private String typeName;

    /**
     * 课程名称字符串
     */

    @TableField(exist = false)
    private String courseName;

    /**
     * 考试科目数据
     */

    @TableField(exist = false)
    private List<CoreExaminationCourse> courseList;


    /**
     * 省id
     */
    @TableField("province_id")
    private Long provinceId;


    /**
     * 市id
     */
    @TableField("city_id")
    private Long cityId;


    /**
     * 县id
     */
    @TableField("county_id")
    private Long countyId;


    /**
     * 乡id
     */
    @TableField("village_id")
    private Long villageId;

    /**
     * 是否有学生的标识
     */
    @TableField(exist = false)
    private String stuname;

    @TableField(exist = false)
    private Integer pageNum;

    @TableField(exist = false)
    private Integer pageSize;
}