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.

97 lines
2.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.yanzhen.entity;
import org.hibernate.validator.constraints.Length;
import com.yanzhen.utils.Entity;
public class Building extends Entity{
private Integer id;// 定义一个私有的Integer类型的id变量用于存储建筑的唯一标识符
@Length(max = 100)// 使用@Length注解限制name字段的最大长度为100个字符
private String name;
private Integer type;// 定义一个私有的Integer类型的type变量用于表示宿舍类型例如4人间、6人间、8人间
private Integer storeyNum;// 定义一个私有的Integer类型的storeyNum变量用于存储宿舍的层数
private Integer sex;// 定义一个私有的Integer类型的sex变量可能用于表示性别或性别比例例如男多于女或反之
@Length(max = 200) // 使用@Length注解限制remark字段的最大长度为200个字符
private String remark;
private Integer userId; // 定义一个私有的Integer类型的userId变量用于关联用户表的主键ID
private User user;// 定义一个User类型的user变量用于存储与该建筑相关的用户信息
public Integer getId() {
return id;// 获取id的值
}
public void setId(Integer id) {
this.id = id;// 设置id的值
}
public String getName() {
return name;// 获取name的值
}
public void setName(String name) {
this.name = name;// 设置name的值
}
public Integer getType() {
return type; // 获取type的值
}
public void setType(Integer type) {
this.type = type;// 设置type的值
}
public Integer getStoreyNum() {
return storeyNum;// 获取storeyNum的值
}
public void setStoreyNum(Integer storeyNum) {
this.storeyNum = storeyNum;// 设置storeyNum的值
}
public Integer getSex() {
return sex;// 获取sex的值
}
public void setSex(Integer sex) {
this.sex = sex;// 设置sex的值
}
public String getRemark() {
return remark;// 获取remark的值
}
public void setRemark(String remark) {
this.remark = remark;// 设置remark的值
}
public Integer getUserId() {
return userId;// 获取userId的值
}
public void setUserId(Integer userId) {
this.userId = userId;// 设置userId的值
}
public User getUser() {// 获取user的值
return user;
}
public void setUser(User user) {// 设置user的值
this.user = user;
}
}