@@ -0,0 +1,62 @@
|
||||
package com.yunhai.acaclassroom.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 教室。campus_id 随楼栋冗余存储(校区调整楼栋时同步),楼栋内教室编号唯一。
|
||||
*/
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
@Table(name = "aca_classroom")
|
||||
public class Classroom extends BaseEntity {
|
||||
|
||||
/** 所属校区 id(冗余自楼栋,列表/统计按校区过滤免联表) */
|
||||
@Column(name = "campus_id", nullable = false)
|
||||
private Integer campusId;
|
||||
|
||||
/** 所属楼栋 id(aca_building.id) */
|
||||
@Column(name = "building_id", nullable = false)
|
||||
private Integer buildingId;
|
||||
|
||||
/** 所在楼层(1..楼栋楼层数量) */
|
||||
@Column(name = "floor", nullable = false)
|
||||
private Integer floor;
|
||||
|
||||
/** 教室名称 */
|
||||
@Column(name = "room_name", nullable = false, length = 100)
|
||||
private String roomName;
|
||||
|
||||
/** 教室编号(楼栋内唯一,默认 楼栋编号+楼层2位+序号2位,如 A0103) */
|
||||
@Column(name = "room_code", nullable = false, length = 32)
|
||||
private String roomCode;
|
||||
|
||||
/** 教室类型 id(aca_classroom_type.id) */
|
||||
@Column(name = "type_id")
|
||||
private Integer typeId;
|
||||
|
||||
/** 教室状态:open 开放 / closed 关闭 */
|
||||
@Column(name = "status", nullable = false, length = 8)
|
||||
private String status;
|
||||
|
||||
/** 教室容纳人数 */
|
||||
@Column(name = "capacity")
|
||||
private Integer capacity;
|
||||
|
||||
/** 座位数 */
|
||||
@Column(name = "seat_count")
|
||||
private Integer seatCount;
|
||||
|
||||
/** 绑定班级 id(aca_class.id,可空=未绑定;同一班级同时只能绑一间教室) */
|
||||
@Column(name = "class_id")
|
||||
private Integer classId;
|
||||
|
||||
/** 所属学校 id(多租户) */
|
||||
@Column(name = "sch_id", nullable = false)
|
||||
private Integer schId;
|
||||
}
|
||||
Reference in New Issue
Block a user