package com.pangu.school.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pangu.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * 学校班级关联实体类
 * @author pangu
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("pg_school_class")
public class SchoolClass extends BaseEntity {
    private static final long serialVersionUID = 1L;

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

    /** 学校年级关联ID */
    @NotNull(message = "学校年级ID不能为空")
    private Long schoolGradeId;

    /** 班级ID */
    @NotNull(message = "班级ID不能为空")
    private Long classId;

    /** 班级名称（关联查询）*/
    @TableField(exist = false)
    private String className;

    /** 显示顺序 */
    private Integer orderNum;

    /** 状态（0正常 1停用）*/
    private String status;
}
