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.

46 lines
1.5 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; // 导入Length注解用于验证字符串长度
import com.yanzhen.utils.Entity; // 导入自定义的Entity类
import java.util.Map; // 导入Map接口
public class Bed extends Entity{ // 定义Bed类继承自Entity类
private Integer id; // 定义id属性类型为Integer
@Length(max = 50) // 使用Length注解限制bno的最大长度为50
private String bno; // 定义bno属性类型为String
private Integer dormitoryId; // 定义dormitoryId属性类型为Integer
private Map<String,Object> student; // 定义student属性类型为Map键为String值为Object
// 以下为getter和setter方法
public Integer getId() { // 获取id的值
return id;
}
public void setId(Integer id) { // 设置id的值
this.id = id;
}
public String getBno() { // 获取bno的值
return bno;
}
public void setBno(String bno) { // 设置bno的值
this.bno = bno;
}
public Integer getDormitoryId() { // 获取dormitoryId的值
return dormitoryId;
}
public void setDormitoryId(Integer dormitoryId) { // 设置dormitoryId的值
this.dormitoryId = dormitoryId;
}
public Map<String, Object> getStudent() { // 获取student的值
return student;
}
public void setStudent(Map<String, Object> student) { // 设置student的值
this.student = student;
}
}