using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using YGNT.QuestionLibrary.Disciplines.Dto;

namespace YGNT.QuestionLibrary.Disciplines
{
    /// <summary>
    /// 学科管理
    /// </summary>
    public interface IDisciplineAppService : IApplicationService
    {
        /// <summary>
        /// 查询学科列表
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        Task<PagedResultDto<DisciplineDto>> GetListAsync(SearchDisciplineInputDto search);

        /// <summary>
        /// 查询学科详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<DisciplineDto> GetOneAsync(int id);
        /// <summary>
        /// 根据年级ID和科目ID获取主键
        /// </summary>
        /// <param name="gradeId"></param>
        /// <param name="courseId"></param>
        /// <returns></returns>
        Task<DisciplineDto> GetOndeByGradeAsync(int gradeId, int courseId);


        /// <summary>
        /// 创建新学科
        /// </summary>
        /// <param name="create"></param>
        /// <returns></returns>
        Task<int> CreateAsync(CreateDisciplineDto create);


        /// <summary>
        /// 修改学科
        /// </summary>
        /// <param name="id"></param>
        /// <param name="update"></param>
        /// <returns></returns>
        Task UpdateAsync(int id, UpdateDisciplineDto update);

        /// <summary>
        /// 删除学科
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(int id);

        /// <summary>
        /// 删除学科
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task DeleteListAsync(List<int> idList);
        /// <summary>
        /// 同步学科
        /// </summary>
        /// <returns></returns>
        Task DataSyncAsync();
    }
}