Saving
This commit is contained in:
1 parent
9719a0c0fd
commit
1e66851113
146 files changed
+738
-382
No files matched your search
@@ -0,0 +1,48 @@
|
||||
using MongoDB.Entities;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PrivaPub.Models.User
|
||||
{
|
||||
public class RootUser : Entity
|
||||
{
|
||||
[StringLength(32)]
|
||||
public string UserName { get; set; }
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
public bool IsEmailValidated { get; set; } = false;
|
||||
public bool IsBanned { get; set; } = false;
|
||||
public string HashedPassword { get; set; }
|
||||
public List<string> Policies { get; set; } = new() { ClientModels.Policies.IsUser };
|
||||
public List<ContactItem> Contacts { get; set; } = new();
|
||||
public RootUserSettings Settings { get; set; } = new();
|
||||
|
||||
public string ResetPasswordToken { get; set; }
|
||||
public DateTime? ResetPasswordTokenSentAt { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? DeletedAt { get; set; }
|
||||
}
|
||||
|
||||
public class ContactItem
|
||||
{
|
||||
public string Type { get; set; }
|
||||
public string Contact { get; set; }
|
||||
public string Note { get; set; }
|
||||
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public class RootUserSettings
|
||||
{
|
||||
public string LanguageCode { get; set; } = "en-GB";
|
||||
|
||||
public short IconsThemeIndexColour { get; set; } = 25;
|
||||
public short LightThemeIndexColour { get; set; } = 25;
|
||||
public short DarkThemeIndexColour { get; set; } = 215;
|
||||
public bool PreferSystemTheming { get; set; } = true;
|
||||
public bool ThemeIsDarkMode { get; set; } = false;
|
||||
public bool ThemeIsDarkGray { get; set; } = false;
|
||||
public bool ThemeIsLightGray { get; set; } = true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user