package com.hzu.labbooking.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.MpBaseEntity;

/**
 * 课程信息对象 lms_course
 *
 * @author yezihao
 * @date 2021-04-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("lms_course")
public class Course extends MpBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 课程编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField(exist = false)
    private Long courseId; //和id的值相同，规避命名冲突用的

    /**
     * 课程名称
     */
    @Excel(name = "课程名称")
    private String name;

    @TableField(exist = false)
    private String courseName; //和name的值相同，规避命名冲突用的

    /**
     * 授课教师编号
     */
    @Excel(name = "授课教师编号")
    private Long userId;

    /**
     * 课程条件[软件或硬件,多个用逗号隔开]
     */
    @Excel(name = "课程条件")
    private String requirement;

    /**
     * 班级名称[多个用逗号隔开]
     */
    @Excel(name = "班级名称")
    private String className;

    /**
     * 课程人数
     */
    @Excel(name = "课程人数")
    private Long number;

    /**
     * 课程人数
     */
    @Excel(name = "学年")
    private Long year;

    /**
     * 课程人数
     */
    @Excel(name = "学期")
    private Long term;

    /**
     * 课程备注
     */
    @Excel(name = "课程备注")
    private String remarks;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT) //插入操作时自动更新该字段
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE) //插入和更新操作时自动更新该字段
    private Date gmtModified;

}
