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.time.LocalTime;

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

/**
 * 课程表时间安排模板详细表 Entity
 *
 * @author zhanghaijun
 * @date 2021-08-15 11:36:14
 */
@Data
@TableName("edu_class_schedule_time_model_detail")
public class EduClassScheduleTimeModelDetail {

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

    /**
     * 模板ID
     */
    @ApiModelProperty(value = "模板ID")
    @TableField("model_id")
    private Long modelId;

    /**
     * 名称：“第一节、第二节”
     */
    @ApiModelProperty(value = "名称：“第一节、第二节”")
    @TableField("name")
    private String name;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间 HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private LocalTime beginTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间 HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private LocalTime endTime;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @TableField("sort")
    private Integer sort;

    /**
     * 创建时间
     */
    @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;

}
