using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 学制管理服务
/// </summary>
[ApiDescriptionSettings(Name = "base-education-stage-years")]
[Route("base/education-stage/years")]
public class EducationStageYearsAppService : IDynamicApiController
{
    private readonly IEducationStageYearsService _educationStageYearsService;
    public EducationStageYearsAppService(IEducationStageYearsService educationStageYearsService)
    {
        _educationStageYearsService = educationStageYearsService;
    }

    /// <summary>
    /// 根据学段获取学制
    /// </summary>
    /// <param name="educationStage"></param>
    /// <returns></returns>
    public async Task<EducationStageYearsOutput> GetByEducationStage([FromQuery][Required] EducationStage educationStage)
    {
        return await _educationStageYearsService.GetByEducationStage(educationStage);
    }
    /// <summary>
    /// 获取学制列表
    /// </summary>
    /// <returns></returns>
    public async Task<List<EducationStageYearsOutput>> GetAllList()
    {
        return await _educationStageYearsService.GetAllList();
    }
}
