1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-21 23:42:45 +01:00
Minecraft-Phantom-Panel/Controller/Phantom.Controller.Database/Entities/UserEntity.cs
2024-03-30 17:08:57 +01:00

25 lines
601 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Phantom.Common.Data.Web.Users;
namespace Phantom.Controller.Database.Entities;
[Table("Users", Schema = "identity")]
public sealed class UserEntity {
[Key]
public Guid UserGuid { get; init; }
public string Name { get; init; }
public string PasswordHash { get; set; }
public UserEntity(Guid userGuid, string name, string passwordHash) {
UserGuid = userGuid;
Name = name;
PasswordHash = passwordHash;
}
public UserInfo ToUserInfo() {
return new UserInfo(UserGuid, Name);
}
}