package com.happy.dto;

import lombok.Data;

@Data
public class OwnerHouseDto {

    /**
     * 管理ID
     */
    public Integer managerId;

    /**
     * 总房间数
     */
    public Integer totalHouseNum;

    /**
     * 已用房间数
     */
    public Integer usedHouseNum;

    /**
     * 剩余房间数
     */
    public Integer residueHouseNum;

    public Integer getResidueHouseNum() {
        return totalHouseNum == null ? 0 : totalHouseNum - (usedHouseNum == null ? 0 : usedHouseNum);
    }

    public void setResidueHouseNum(Integer residueHouseNum) {
        this.residueHouseNum = residueHouseNum;
    }
}
