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