package rd.data.db.table;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import rd.dao.type.json.FloatMapTypeHandler;
//import org.apache.ibatis.type.ArrayTypeHandler;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName(autoResultMap = true)
public class Course implements Serializable {
    /**
     * 课程id
     */
    private Long id;

    /**
     * 课程名称
     */
    private String name;

    /**
     * 课时
     */
    private Integer courseHours;

    /**
     * 是否春季期课程（false即是秋季期）
     */
    private Boolean springTerm;

    /**
     * 考试成绩占比
     */
    private Float examRatio;

    /**
     * 平时分组成描述
     */
    @TableField(typeHandler = FloatMapTypeHandler.class)
    private Map<String, Float> distribution;

    /**
     * create_time
     */
    private LocalDateTime createTime;

    /**
     * edit_time
     */
    private LocalDateTime editTime;

    /**
     * delete
     */
    private Boolean deleted;
}
