mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.ValueGeneration.Internal;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace SharpbinV3.Data.Entities
|
||||
{
|
||||
[Index(nameof(UID), IsUnique = true)]
|
||||
[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 Type { get; set; } = 0; // 0 = regular user, 1 = moderator, 255 = admin
|
||||
public int Visiblity { get; set; } = 0; // 0 = public, 1 = unlisted, 2 = private
|
||||
public List<Paste> Pastes { get; set; } = [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user