using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Domain.Services;
using YGNT.Infrastructure.Model;
using YGNT.QuestionLibrary.Core.BaseData.Enum;
using YGNT.QuestionLibrary.Core.Disciplines;
using YGNT.QuestionLibrary.Core.Models;

namespace YGNT.QuestionLibrary.Core.BaseData.Domain
{
    /// <summary>
    /// 题型管理
    /// </summary>
    public interface IQuestionTypeManager : IDomainService
    {
        /// <summary>
        /// 检查题型名称是否被占用
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        Task CheckNameAsync(string name);

        /// <summary>
        /// 创建新题型
        /// </summary>
        /// <param name="name"></param>
        /// <param name="questionCategory"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        Task<QuestionType> CreateAsync(string name, QuestionCategory questionCategory, int? sort = null);

        /// <summary>
        /// 排序
        /// </summary>
        /// <param name="questionType"></param>
        /// <param name="sortType"></param>
        /// <returns></returns>
        Task SortAsync(QuestionType questionType, SortType sortType);

        /// <summary>
        /// 修改题型
        /// </summary>
        /// <param name="questionType"></param>
        /// <param name="name"></param>
        /// <param name="questionCategory"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        Task UpdateAsync(QuestionType questionType, string name, QuestionCategory questionCategory, int sort);

        /// <summary>
        /// 修改题型排序
        /// </summary>
        /// <param name="questionType"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        Task<QuestionType> UpdateSortAsync(QuestionType questionType, int sort);

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

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="questionType"></param>
        /// <returns></returns>
        Task DeleteAsync(QuestionType questionType);
    }
}