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

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.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 课程表管理 Entity
 *
 * @author zhanghaijun
 * @date 2021-08-15 11:35:39
 */
@Data
@TableName("edu_class_schedule")
public class EduClassSchedule {

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

    /**
     * 课程表名称
     */
    @ApiModelProperty(value = "课程表名称")
    @TableField("name")
    private String name;

    /**
     * 所属学校主键ID
     */
    @ApiModelProperty(value = "所属学校主键ID")
    @TableField("school_id")
    private Long schoolId;

    private String schoolName;

    /**
     * 所属校区主键ID
     */
    @ApiModelProperty(value = "所属校区主键ID")
    @TableField("district_id")
    private Long districtId;

    private String districtName;

    private Long sectionId;

    private String sectionName;

    /**
     * 所属年级主键ID
     */
    @ApiModelProperty(value = "所属年级主键ID")
    @TableField("grade_id")
    private Long gradeId;

    private String gradeName;

    /**
     * 所属学期ID
     */
    @ApiModelProperty(value = "所属学期ID")
    @TableField("semester_id")
    private Long semesterId;

    /**
     * 学期名称
     */
    @ApiModelProperty(value = "学期名称")
    @TableField("semester_name")
    private String semesterName;

    /**
     * 有效开始时间
     */
    @ApiModelProperty(value = "有效开始时间")
    @TableField("begin_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginDate;

    /**
     * 有效结束时间
     */
    @ApiModelProperty(value = "有效结束时间")
    @TableField("end_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    /**
     * 状态，1启用，0停用
     */
    @ApiModelProperty(value = "状态，1启用，0停用")
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @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;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @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;

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

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

    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;


    private transient List<EduClassScheduleTime> timeList;
}
