1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 03:42:50 +02:00
Minecraft-Phantom-Panel/Controller/Phantom.Controller.Database/Entities/RoleEntity.cs
2024-03-30 17:08:57 +01:00

23 lines
506 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Phantom.Common.Data.Web.Users;
namespace Phantom.Controller.Database.Entities;
[Table("Roles", Schema = "identity")]
public sealed class RoleEntity {
[Key]
public Guid RoleGuid { get; init; }
public string Name { get; init; }
public RoleEntity(Guid roleGuid, string name) {
RoleGuid = roleGuid;
Name = name;
}
public RoleInfo ToRoleInfo() {
return new RoleInfo(RoleGuid, Name);
}
}