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 IEquipmentCalibrationRepository : IRepositoryBase<EquipmentCalibrationEntity>
{
    /// <summary>
    /// 根据设备ID获取校验记录
    /// </summary>
    /// <param name="equipmentId">设备ID</param>
    /// <returns>校验记录列表</returns>
    Task<List<EquipmentCalibrationEntity>> GetByEquipmentIdAsync(long equipmentId);

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

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