i think this fixes it

This commit is contained in:
2025-12-30 17:48:28 -05:00
parent 0dff8f992b
commit e4966edbb5
5 changed files with 88 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace SharpbinV3.Server.Data.Entities
{
[Index(nameof(UUID), IsUnique = true)]
public sealed class User
{
[Key]
public int UID { get; set; }
public required Guid UUID { get; set; } = Guid.CreateVersion7(); // uuid v7 includes timestamp
public required string Username { get; set; }
public required string PasswordHash { get; set; }
public string? Email { get; set; }
public string? DisplayName { get; set; }
public long? LastLogin { get; set; }
public int[] Roles { get; set; } = [0]; // 0 = regular user, 1 = moderator, 255 = admin
public int Visibility { get; set; } = 0; // 0 = public, 1 = unlisted, 2 = private
public List<Paste> Pastes { get; set; } = [];
}
}