You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
1.8 KiB
86 lines
1.8 KiB
//定义包名
|
|
package com.yanzhen.entity;
|
|
//导入包
|
|
import org.hibernate.validator.constraints.Length;
|
|
import com.yanzhen.utils.Entity;
|
|
|
|
|
|
|
|
//定义一个公共类宿舍,继承自实体类
|
|
public class Dormitory extends Entity{
|
|
|
|
//定义私有变量id
|
|
private Integer id;
|
|
// 使用Length限制bno的最大长度为50
|
|
@Length(max = 50)
|
|
//定义私有变量no
|
|
private String no;
|
|
//定义私有变量性别
|
|
private Integer sex;
|
|
//定义私有变量类型
|
|
private Integer type;
|
|
//定义私有变量容量
|
|
private Integer capacity;
|
|
//定义私有变量楼层id
|
|
private Integer storeyId;
|
|
//定义楼id
|
|
private Integer buildingId;
|
|
|
|
|
|
//获取id的方法
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
//定义修改id的方法
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
//定义获取no的方法
|
|
public String getNo() {
|
|
return no;
|
|
}
|
|
//定义修改no的方法
|
|
public void setNo(String no) {
|
|
this.no = no;
|
|
}
|
|
//定义获取性别的方法
|
|
public Integer getSex() {
|
|
return sex;
|
|
}
|
|
//定义修改性别的方法
|
|
public void setSex(Integer sex) {
|
|
this.sex = sex;
|
|
}
|
|
//定义获取类型的方法
|
|
public Integer getType() {
|
|
return type;
|
|
}
|
|
//定义修改类型的方法
|
|
public void setType(Integer type) {
|
|
this.type = type;
|
|
}
|
|
//定义获取容量的方法
|
|
public Integer getCapacity() {
|
|
return capacity;
|
|
}
|
|
//定义修改容量的方法
|
|
public void setCapacity(Integer capacity) {
|
|
this.capacity = capacity;
|
|
}
|
|
//定义获取楼层id的方法
|
|
public Integer getStoreyId() {
|
|
return storeyId;
|
|
}
|
|
//定义修改楼层id的方法
|
|
public void setStoreyId(Integer storeyId) {
|
|
this.storeyId = storeyId;
|
|
}
|
|
//定义获取楼id的方法
|
|
public Integer getBuildingId() {
|
|
return buildingId;
|
|
}
|
|
//定义修改楼id的方法
|
|
public void setBuildingId(Integer buildingId) {
|
|
this.buildingId = buildingId;
|
|
}
|
|
} |