using MediatR; using TakeoutSaaS.Application.Identity.Contracts; using TakeoutSaaS.Domain.Identity.Enums; namespace TakeoutSaaS.Application.Identity.Commands; /// /// 从预置模板复制角色并绑定权限。 /// public sealed record CopyRoleTemplateCommand : IRequest { /// /// 目标 Portal。 /// public PortalType Portal { get; init; } /// /// 目标租户 ID(Portal=Tenant 时必填;Portal=Admin 时必须为空)。 /// public long? TenantId { get; init; } /// /// 模板编码。 /// public string TemplateCode { get; init; } = string.Empty; /// /// 复制后角色名称(为空则使用模板名称)。 /// public string? RoleName { get; init; } /// /// 复制后角色编码(为空则使用模板编码)。 /// public string? RoleCode { get; init; } /// /// 角色描述(为空则沿用模板描述)。 /// public string? Description { get; init; } }