forked from gongxuegit/tiku-backend.net
feat(saas): implement marketplace and tenant onboarding
This commit is contained in:
@@ -4,13 +4,34 @@ using Tiku.Domain.Operations;
|
||||
|
||||
namespace Tiku.Api.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// 创建或更新后台角色请求。
|
||||
/// </summary>
|
||||
public sealed class UpsertBackofficeRoleDto
|
||||
{
|
||||
/// <summary>
|
||||
/// ID。
|
||||
/// </summary>
|
||||
public Guid? Id { get; set; }
|
||||
/// <summary>
|
||||
/// 编码。
|
||||
/// </summary>
|
||||
public string Code { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 名称。
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 状态。
|
||||
/// </summary>
|
||||
public BackendRoleStatus Status { get; set; } = BackendRoleStatus.Active;
|
||||
/// <summary>
|
||||
/// 说明。
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
/// <summary>
|
||||
/// 数据范围配置。
|
||||
/// </summary>
|
||||
public JsonElement? DataScope { get; set; }
|
||||
|
||||
public UpsertBackofficeRoleCommand ToCommand()
|
||||
@@ -19,9 +40,18 @@ public sealed class UpsertBackofficeRoleDto
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 替换角色权限绑定请求。
|
||||
/// </summary>
|
||||
public sealed class ReplaceRoleBindingsDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 权限编码列表。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<string> PermissionCodes { get; set; } = [];
|
||||
/// <summary>
|
||||
/// 菜单编码列表。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<string> MenuCodes { get; set; } = [];
|
||||
|
||||
public ReplaceRoleBindingsCommand ToCommand(Guid roleId)
|
||||
@@ -30,8 +60,14 @@ public sealed class ReplaceRoleBindingsDto
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 替换用户角色请求。
|
||||
/// </summary>
|
||||
public sealed class ReplaceUserRolesDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色 ID 列表。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<Guid> RoleIds { get; set; } = [];
|
||||
|
||||
public ReplaceUserRolesCommand ToCommand(Guid userId)
|
||||
|
||||
Reference in New Issue
Block a user