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);

        Task ReductionOneOperationRecordAsync(int id);
        /// <summary>
        /// 透過搜尋條件，查詢過濾後的運維作業記錄
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        Task<List<OperationRecordDataTable>> GetAllRecordByFilterAsync(PostOperationRecordFilter filter);

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

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

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

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

        Task DeleteOneOperationRecordAsync(int id);

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

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

        Task<List<OperationCreatePlan>> GetOperationSchedules();

        Task<List<MyUser>> GetOperationPersonnel(int PowerStationId);

        Task InsertNoticeSchedule(List<MyUser> personal, string Title, string content);

        Task AddOperationRecordPersonnelAsync(List<OperationRecordPersonnel> entity, List<string> properties);

        Task<List<int>> GetOperationRecordPersonnelIdsByOperationRecordId(int operationRecordId);

        Task DeleteOperationRecordPersonnel(List<OperationRecordPersonnel> operationRecordPersonnels);

        Task DeleteRecord(List<int> operations);
    }
    
}
