using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ZhonTai.Admin.Core.Repositories;

namespace NPP.SmartSchedue.Api.Contracts.Domain.Equipment;

/// <summary>
/// 设备维护仓储接口（简化版本，专用于SmartSchedule模块）
/// </summary>
public interface IEquipmentMaintenanceRepository : IRepositoryBase<EquipmentMaintenanceEntity>
{
    /// <summary>
    /// 根据设备ID获取维护记录
    /// </summary>
    /// <param name="equipmentId">设备ID</param>
    /// <returns>维护记录列表</returns>
    Task<List<EquipmentMaintenanceEntity>> GetByEquipmentIdAsync(long equipmentId);

    /// <summary>
    /// 检查设备是否有进行中的维护
    /// </summary>
    /// <param name="equipmentId">设备ID</param>
    /// <returns>是否有进行中的维护</returns>
    Task<bool> HasInProgressMaintenanceAsync(long equipmentId);

    /// <summary>
    /// 获取指定日期需要维护的设备ID列表
    /// </summary>
    /// <param name="date">指定日期</param>
    /// <returns>设备ID列表</returns>
    Task<List<long>> GetMaintenanceEquipmentIdsAsync(DateTime date);
}