Refactored project to module structure
This commit is contained in:
12
Moonlight.Shared/Admin/Users/Roles/CreateRoleDto.cs
Normal file
12
Moonlight.Shared/Admin/Users/Roles/CreateRoleDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.Shared.Admin.Users.Roles;
|
||||
|
||||
public class CreateRoleDto
|
||||
{
|
||||
[Required] [MaxLength(30)] public string Name { get; set; }
|
||||
|
||||
[MaxLength(300)] public string Description { get; set; } = "";
|
||||
|
||||
[Required] public string[] Permissions { get; set; }
|
||||
}
|
||||
10
Moonlight.Shared/Admin/Users/Roles/RoleDto.cs
Normal file
10
Moonlight.Shared/Admin/Users/Roles/RoleDto.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Moonlight.Shared.Admin.Users.Roles;
|
||||
|
||||
public record RoleDto(
|
||||
int Id,
|
||||
string Name,
|
||||
string Description,
|
||||
string[] Permissions,
|
||||
int MemberCount,
|
||||
DateTimeOffset CreatedAt,
|
||||
DateTimeOffset UpdatedAt);
|
||||
12
Moonlight.Shared/Admin/Users/Roles/UpdateRoleDto.cs
Normal file
12
Moonlight.Shared/Admin/Users/Roles/UpdateRoleDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Moonlight.Shared.Admin.Users.Roles;
|
||||
|
||||
public class UpdateRoleDto
|
||||
{
|
||||
[Required] [MaxLength(30)] public string Name { get; set; }
|
||||
|
||||
[MaxLength(300)] public string Description { get; set; } = "";
|
||||
|
||||
[Required] public string[] Permissions { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user