feat: 新增RBAC角色模板复制与初始化

This commit is contained in:
2025-12-03 19:55:25 +08:00
parent 0c329669a9
commit ea33e6fefe
23 changed files with 1054 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
using MediatR;
using TakeoutSaaS.Application.Identity.Contracts;
namespace TakeoutSaaS.Application.Identity.Commands;
/// <summary>
/// 从预置模板复制角色并绑定权限。
/// </summary>
public sealed record CopyRoleTemplateCommand : IRequest<RoleDto>
{
/// <summary>
/// 模板编码。
/// </summary>
public string TemplateCode { get; init; } = string.Empty;
/// <summary>
/// 复制后角色名称(为空则使用模板名称)。
/// </summary>
public string? RoleName { get; init; }
/// <summary>
/// 复制后角色编码(为空则使用模板编码)。
/// </summary>
public string? RoleCode { get; init; }
/// <summary>
/// 角色描述(为空则沿用模板描述)。
/// </summary>
public string? Description { get; init; }
}