namespace Tiobon.Core.Api.Controllers;

/// <summary>
/// 培训证书规则(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghre)]
public class Ghre_CertificateRuleController : BaseController<IGhre_CertificateRuleServices, Ghre_CertificateRule, Ghre_CertificateRuleDto, InsertGhre_CertificateRuleInput, EditGhre_CertificateRuleInput>
{
    public Ghre_CertificateRuleController(IGhre_CertificateRuleServices service) : base(service)
    {
    }

    #region 证书预览
    /// <summary>
    ///  证书预览
    /// </summary>
    /// <param name="id"></param>
    [HttpPost, Route("Preview/{id}")]
    public virtual async Task<ServiceResult<Ghre_CertificateRuleDto>> Preview(long id)
    {
        return await _service.Preview(id);
    }
    #endregion
}