Refactored project to module structure
This commit is contained in:
22
Moonlight.Api/Infrastructure/Database/Entities/Role.cs
Normal file
22
Moonlight.Api/Infrastructure/Database/Entities/Role.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Moonlight.Api.Infrastructure.Database.Interfaces;
|
||||
|
||||
namespace Moonlight.Api.Infrastructure.Database.Entities;
|
||||
|
||||
public class Role : IActionTimestamps
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[MaxLength(30)] public required string Name { get; set; }
|
||||
|
||||
[MaxLength(300)] public required string Description { get; set; }
|
||||
|
||||
public string[] Permissions { get; set; } = [];
|
||||
|
||||
// Relations
|
||||
public List<RoleMember> Members { get; set; } = [];
|
||||
|
||||
// Action timestamps
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
public DateTimeOffset UpdatedAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user