feat: 角色模板改为数据库管理支持前端自定义
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.Identity.Contracts;
|
||||
|
||||
namespace TakeoutSaaS.Application.Identity.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 创建角色模板命令。
|
||||
/// </summary>
|
||||
public sealed record CreateRoleTemplateCommand : IRequest<RoleTemplateDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板编码。
|
||||
/// </summary>
|
||||
public string TemplateCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称。
|
||||
/// </summary>
|
||||
public string Name { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 模板描述。
|
||||
/// </summary>
|
||||
public string? Description { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
/// </summary>
|
||||
public bool IsActive { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 权限编码集合。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<string> PermissionCodes { get; init; } = Array.Empty<string>();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using MediatR;
|
||||
|
||||
namespace TakeoutSaaS.Application.Identity.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 删除角色模板命令。
|
||||
/// </summary>
|
||||
public sealed record DeleteRoleTemplateCommand : IRequest<bool>
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板编码。
|
||||
/// </summary>
|
||||
public string TemplateCode { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.Identity.Contracts;
|
||||
|
||||
namespace TakeoutSaaS.Application.Identity.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 更新角色模板命令。
|
||||
/// </summary>
|
||||
public sealed record UpdateRoleTemplateCommand : IRequest<RoleTemplateDto?>
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板编码(路径参数)。
|
||||
/// </summary>
|
||||
public string TemplateCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称。
|
||||
/// </summary>
|
||||
public string Name { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 模板描述。
|
||||
/// </summary>
|
||||
public string? Description { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
/// </summary>
|
||||
public bool IsActive { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 权限编码集合。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<string> PermissionCodes { get; init; } = Array.Empty<string>();
|
||||
}
|
||||
Reference in New Issue
Block a user