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.

67 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.jiudian.manage.model;
/**
* 房间实体类对应数据库中的room表
* 用于封装酒店房间的核心信息,是房间数据在系统各层流转的核心载体
*/
public class Room {
private Integer roomid; // 房间ID主键自增唯一标识一间酒店房间
private String local; // 房间位置(如"3楼301室"、"1楼豪华套房01",描述房间的具体位置)
private Double money; // 房间单价(单位:元/天,用于计算订单金额)
private Integer state; // 房间状态数字标识如0-空闲、1-已预订、2-已入住、3-维修中,控制房间是否可下单)
private Integer type; // 房间类型数字标识如1-单人间、2-双人间、3-套房、4-亲子房,区分不同房型)
// 获取房间ID唯一标识通常用于关联订单、查询房间详情
public Integer getRoomid() {
return roomid;
}
// 设置房间ID由数据库自增生成前端无需手动传递
public void setRoomid(Integer roomid) {
this.roomid = roomid;
}
// 获取房间位置
public String getLocal() {
return local;
}
// 设置房间位置,自动去除字符串前后空格(避免用户输入多余空格导致位置信息不规范)
public void setLocal(String local) {
this.local = local == null ? null : local.trim();
}
// 获取房间单价(用于订单创建时计算总费用:单价 × 入住天数)
public Double getMoney() {
return money;
}
// 设置房间单价(管理员可通过后台修改,如旺季调价)
public void setMoney(Double money) {
this.money = money;
}
// 获取房间状态(判断房间是否可预订的核心依据)
public Integer getState() {
return state;
}
// 设置房间状态(如订单创建后改"空闲"为"已预订",退房后改"已入住"为"空闲"
public void setState(Integer state) {
this.state = state;
}
// 获取房间类型(用于用户筛选房型,如"只看双人间"
public Integer getType() {
return type;
}
// 设置房间类型(新增房间时指定,区分不同房型的服务与价格)
public void setType(Integer type) {
this.type = type;
}
}