package com.hrs.service;

import com.hrs.model.entity.Reservation;
import java.util.Date;
import java.util.List;

/**   
* Copyright: Copyright (c) 2026 chinasofti
* 
* @ClassName: ReservationService.java
* @Description: 预约看房业务逻辑接口
*
* @version: v1.0.0
* @author: 黄红
* @date: 2026年4月13日 上午10:01:27 
*
* Modification History:
* Date         Author          Version            Description
*---------------------------------------------------------*
* 2026年4月13日    黄红           v1.0.0               新建文件
*/
public interface ReservationService {

    /**
     * 创建预约
     */
    ReservationResult createReservation(Long tenantId, Long houseId, Date reserveTime, String remark);

    /**
     * 获取租客的预约列表
     */
    List<Reservation> getTenantReservations(Long tenantId);

    /**
     * 获取房东收到的预约列表
     */
    List<Reservation> getLandlordReservations(Long landlordId);

    /**
     * 租客取消预约
     */
    boolean cancelReservationByTenant(Long reservationId, Long tenantId);

    /**
     * 房东处理预约（确认/拒绝）
     */
    boolean handleReservation(Long reservationId, Long landlordId, boolean approve);

    /**
     * 获取预约详情
     */
    Reservation getReservationDetail(Long reservationId);

    /**
     * 获取房东待处理预约数量
     */
    int getPendingCount(Long landlordId);

    /**
     * 预约操作结果类
     */
    class ReservationResult {
        private boolean success;
        private String message;

        public boolean isSuccess() { return success; }
        public void setSuccess(boolean success) { this.success = success; }
        public String getMessage() { return message; }
        public void setMessage(String message) { this.message = message; }
    }
}
