namespace Tiobon.Core.Api.Controllers;

/// <summary>
/// 课件(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_CourseWareController : BaseController<IGhre_CourseWareServices, Ghre_CourseWare, Ghre_CourseWareDto, InsertGhre_CourseWareInput, EditGhre_CourseWareInput>
{
    public Ghre_CourseWareController(IGhre_CourseWareServices service) : base(service)
    {
    }

    #region 下载附件压缩包
    /// <summary>
    /// 下载附件压缩包
    /// </summary>
    /// <param name="id">课件ID</param>
    /// <returns></returns>
    [HttpPost("DownZip/{id}")]
    public async Task<ServiceResult<string>> DownZip(long id)
    {
        return await _service.DownZip(id);
    }
    #endregion

}