Implemented roles and action timestamps. Added oermissions selector and interfaces
This commit was merged in pull request #3.
This commit is contained in:
@@ -1,16 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Moonlight.Api.Database.Interfaces;
|
||||
|
||||
namespace Moonlight.Api.Database.Entities;
|
||||
|
||||
public class User
|
||||
public class User : IActionTimestamps
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
// Base information
|
||||
[MaxLength(50)]
|
||||
public required string Username { get; set; }
|
||||
|
||||
[MaxLength(254)]
|
||||
public required string Email { get; set; }
|
||||
|
||||
// Authentication
|
||||
public DateTimeOffset InvalidateTimestamp { get; set; }
|
||||
|
||||
// Relations
|
||||
public List<RoleMember> RoleMemberships { get; set; } = [];
|
||||
|
||||
// Action timestamps
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
public DateTimeOffset UpdatedAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user