Files
jinko.yikatong/Src/Dlhis.Sys.Api/ITenantApi.cs
2024-03-05 19:35:03 +08:00

51 lines
1.3 KiB
C#

using Dlhis.Sys.Api.Response;
using Kurisu.Core.Result;
using Kurisu.RemoteCall.Attributes;
namespace Dlhis.Sys.Api;
/// <summary>
/// 租户Api
/// </summary>
[EnableRemoteClient(Name = "sys-service", BaseUrl = "${InternalRequest:SysRequestUrl}")]
public interface ITenantApi
{
/// <summary>
/// 获取所有租户
/// </summary>
/// <returns></returns>
[Auth]
[Get("/api/tenants/list")]
Task<DefaultApiResult<List<TenantResponse>>> GetTenantsAsync();
[Auth]
[Get("/api/tenants/tree")]
Task<DefaultApiResult<List<TenantTreeResponse>>> GetTenantTreeAsync();
/// <summary>
/// 获取所有租户(内部使用)
/// </summary>
/// <returns></returns>
[Get("/api/tenants/list-internal")]
Task<DefaultApiResult<List<TenantResponse>>> GetTenantsInternalAsync();
/// <summary>
/// 根据code获取租户信息
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
[Auth]
[Get("/api/tenants/single")]
Task<DefaultApiResult<TenantResponse>> GetTenantByCodeAsync(string code);
/// <summary>
/// 获取我的管理的基地/租户
/// </summary>
/// <returns></returns>
[Auth]
[Get("/api/tenants/my")]
Task<DefaultApiResult<List<TenantResponse>>> GetMyTenantsAsync();
}