Initial commit

This commit is contained in:
shiyu
2025-05-18 20:48:20 +08:00
commit cde2c7b997
79 changed files with 5713 additions and 0 deletions

26
Models/DataBase/User.cs Normal file
View 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; }
}