mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-25 10:10:05 +08:00
Initial commit
This commit is contained in:
26
Models/DataBase/User.cs
Normal file
26
Models/DataBase/User.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Foxel.Models.DataBase;
|
||||
|
||||
public class User : BaseModel
|
||||
{
|
||||
[Required] [StringLength(50)] public required string UserName { get; set; }
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
[StringLength(100)]
|
||||
public required string Email { get; set; }
|
||||
|
||||
[Required] [StringLength(255)] public required string PasswordHash { get; set; }
|
||||
|
||||
[StringLength(255)] public string? GithubId { get; set; }
|
||||
public int? RoleId { get; set; }
|
||||
|
||||
public Role? Role { get; set; }
|
||||
|
||||
public ICollection<Favorite>? Favorites { get; set; }
|
||||
|
||||
public ICollection<Tag>? Tags { get; set; }
|
||||
|
||||
public ICollection<Album>? Albums { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user