24 lines
684 B
C#
24 lines
684 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Moonlight.Api.Infrastructure.Database.Interfaces;
|
|
|
|
namespace Moonlight.Api.Infrastructure.Database.Entities;
|
|
|
|
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; }
|
|
} |