feat(console): add role DTOs
This commit is contained in:
parent
8a20a3368e
commit
abb5cd7c41
18
Models/Dtos/CreateRoleDto.cs
Normal file
18
Models/Dtos/CreateRoleDto.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Fengling.Console.Models.Dtos;
|
||||||
|
|
||||||
|
public class CreateRoleDto
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string DisplayName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
public long? TenantId { get; set; }
|
||||||
|
|
||||||
|
public List<string> Permissions { get; set; } = new();
|
||||||
|
}
|
||||||
14
Models/Dtos/RoleDto.cs
Normal file
14
Models/Dtos/RoleDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace Fengling.Console.Models.Dtos;
|
||||||
|
|
||||||
|
public class RoleDto
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
public string? DisplayName { get; set; }
|
||||||
|
public string? Description { get; set; }
|
||||||
|
public long? TenantId { get; set; }
|
||||||
|
public bool IsSystem { get; set; }
|
||||||
|
public List<string>? Permissions { get; set; }
|
||||||
|
public int UserCount { get; set; }
|
||||||
|
public DateTime CreatedAt { get; set; }
|
||||||
|
}
|
||||||
13
Models/Dtos/UpdateRoleDto.cs
Normal file
13
Models/Dtos/UpdateRoleDto.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Fengling.Console.Models.Dtos;
|
||||||
|
|
||||||
|
public class UpdateRoleDto
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string DisplayName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string? Description { get; set; }
|
||||||
|
|
||||||
|
public List<string> Permissions { get; set; } = new();
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user