using SolarPower.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SolarPower.Repository.Interface
{
    public interface IOperationRepository : IRepositoryBase<Operation>
    {
        Task<List<PowerStationIdList>> GetPowerStationIdList(int UserId);
        Task AddOperationPlan(OperationCreatePlan OperationPlan, List<string> properties);
        Task<List<OperationPlanTable>> OperationPlanTable(List<int> id,int Type);
        Task<OperationCreatePlan> GetOneOperation(int id);
        Task UpdateOperationPlan(OperationCreatePlan OperationPlan, List<string> properties);
        Task AddToRecord(PlanToRecord record, List<string> properties2);


        /// <summary>
        /// 透過搜尋條件，查詢過濾後的運維作業記錄
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        Task<List<OperationRecodeDataTable>> GetAllRecodeByFilterAsync(PostOperationRecodeFilter filter);

        /// <summary>
        /// 透過Id，取得單一筆運維作業記錄
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<OperationRecode> GetOneOperationRecodeAsync(int id);

        /// <summary>
        /// 新增一筆運維作業記錄
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="properties"></param>
        /// <returns></returns>
        Task<int> AddOneOperationRecodeAsync(OperationRecode entity, List<string> properties);

        /// <summary>
        /// 修改運維作業記錄
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="properties"></param>
        /// <returns></returns>
        Task UpdateOperationRecodeAsync(UpdateOperationRecode entity, List<string> properties);

        /// <summary>
        /// 新增運維作業記錄的檔案
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="properties"></param>
        /// <returns></returns>
        Task<int> AddOperationRecodeFilesAsync(List<OperationRecodeFile> entity, List<string> properties);

        Task DeleteOneOperationRecodeAsync(int id);

        /// <summary>
        /// 透過Id，取得單一運維作業記錄檔案
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<OperationRecodeFile> GetOneOperationRecodeFileAsync(int id);

        /// <summary>
        /// 透過Id，軟刪除運維作業記錄檔案
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteOneOperationRecodeFile(int id);

        Task<List<OperationCreatePlan>> GetOperationSchedules();
    }
    
}
