using SafeCampus.Application.Services.Business.ClassTeacherService;

namespace SafeCampus.Web.Core.Controllers.Application.Business;
/// <summary>
/// 班主任管理接口
/// </summary>
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 89, Tag = "班主任管理")]
[Route("/business/classTeacher")]
[RolePermission]
public class ClassTeacherController
{
    private readonly IClassTeacherService _classTeacherService;

    public ClassTeacherController(IClassTeacherService classTeacherService)
    {
        _classTeacherService = classTeacherService;
    }

    /// <summary>
    /// 添加班主任
    /// </summary>
    /// <param name="input">添加参数</param>
    /// <returns></returns>
    public async Task<bool>  Add(ClassTeacherInput input)
    {
        return await _classTeacherService.Add(input);
    }

    /// <summary>
    /// 修改班主任
    /// </summary>
    /// <param name="input">添加参数</param>
    /// <returns></returns>
    public async Task<bool> Update(ClassTeacherUpdateInput input)
    {
        return await _classTeacherService.Update(input);
    }

    /// <summary>
    /// 删除班主任
    /// </summary>
    /// <param name="id">id</param>
    /// <returns></returns>
    public async Task<bool> Delete(long id)
    {
        return await _classTeacherService.Delete(id);
    }

    /// <summary>
    /// 根据班级id获取班主任信息
    /// </summary>
    /// <returns></returns>
    public async Task<ClassTeacherDto> GetInfo(string personSetId)
    {
        return await _classTeacherService.GetInfo(personSetId);
    }

    /// <summary>
    /// 获取列表
    /// </summary>
    /// <returns></returns>
    public async Task<List<ClassTeacherDto>> GetNoPageList()
    {
        return await _classTeacherService.GetNoPageList();
    }
}