Initial commit
This commit is contained in:
commit
63ee71a19b
123 files changed
+11268
No files matched your search
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using OnlyPrompt.Backend.Database.Core;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace OnlyPrompt.Backend.Database.Models
|
||||
{
|
||||
[Index(nameof(Email), IsUnique = true)]
|
||||
[Index(nameof(UserName), IsUnique = true)]
|
||||
public class UserModel : EntityBase
|
||||
{
|
||||
[MaxLength(100)]
|
||||
[Column(TypeName = "citext")]
|
||||
public required string UserName { get; set; }
|
||||
|
||||
[Column(TypeName = "citext")]
|
||||
public required string Email { get; set; }
|
||||
public required string PasswordHash { get; set; }
|
||||
public required List<string> Roles { get; set; } = new List<string>();
|
||||
|
||||
[Required]
|
||||
public required virtual UserProfileModel Profile { get; set; }
|
||||
|
||||
public virtual IList<PromptModel> Prompts { get; set; } = new List<PromptModel>();
|
||||
public virtual IList<SubscriptionModel> Subscriptions { get; set; } = new List<SubscriptionModel>();
|
||||
public virtual IList<SubscriptionModel> Subscribers { get; set; } = new List<SubscriptionModel>();
|
||||
public virtual IList<SubscriptionTierModel> SubscriptionTiers { get; set; } = new List<SubscriptionTierModel>();
|
||||
|
||||
public bool IsLockoutEnabled { get; set; } = false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user