Files
TakeoutSaaS.AdminApi/src/Application/TakeoutSaaS.Application/Identity/Commands/CloneTenantRoleCommand.cs
MSuMshk 395ac4da05 feat: 实现克隆租户角色接口
- POST /api/admin/v1/tenants/{tenantId}/roles/{roleId}/clone
- 支持复制角色基本信息和权限

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:25:12 +00:00

41 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using MediatR;
using TakeoutSaaS.Application.Identity.Contracts;
namespace TakeoutSaaS.Application.Identity.Commands;
/// <summary>
/// 克隆租户角色命令。
/// </summary>
public sealed record CloneTenantRoleCommand : IRequest<RoleDto>
{
/// <summary>
/// 租户 ID由路由绑定
/// </summary>
public long TenantId { get; init; }
/// <summary>
/// 源角色 ID由路由绑定
/// </summary>
public long SourceRoleId { get; init; }
/// <summary>
/// 新角色编码(租户内唯一)。
/// </summary>
public string NewCode { get; init; } = string.Empty;
/// <summary>
/// 新角色名称(为空则沿用源角色)。
/// </summary>
public string? Name { get; init; }
/// <summary>
/// 新角色描述(为空则沿用源角色)。
/// </summary>
public string? Description { get; init; }
/// <summary>
/// 是否复制权限(默认 true
/// </summary>
public bool CopyPermissions { get; init; } = true;
}