namespace Tiobon.Core.Api.Controllers;

/// <summary>
/// Ghra_Staff(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghra)]
public class Ghra_StaffController : BaseController<IGhra_StaffServices, Ghra_Staff, Ghra_StaffDto, InsertGhra_StaffInput, EditGhra_StaffInput>
{
    public Ghra_StaffController(IGhra_StaffServices service) : base(service)
    {
    }

    #region 查询

    /// <summary>
    /// 根据Id查询数据
    /// </summary>
    /// <param name="Id"></param>
    /// <returns></returns>
    [HttpPost("QuerySimple/{Id}")]
    public async Task<ServiceResult<Ghra_StaffDto>> QuerySimple(int Id)
    {
        return await _service.QuerySimple(Id);
    }
    #endregion

    #region 查询邮箱

    /// <summary>
    /// 查询邮箱
    /// </summary>
    /// <param name="Id"></param>
    /// <returns></returns>
    [HttpPost("QueryEmail/{Id}")]
    public async Task<ServiceResult<string>> QueryEmail(int Id) => await _service.QueryEmail(Id);
    #endregion

}