using System; using IRaCIS.Application.ViewModels; namespace IRaCIS.Core.API.Auth { public class UserClaims { public Guid Id { get; set; } public string[] Role { get; set; } public string FullName { get; set; } public string ReviewerCode { get; set; } public string RealName { get; set; } public string Phone { get; set; } public string PhotoPath { get; set; } public static UserClaims Create(UserBasicInfo user) { string[] roles = { "SysUser" }; return new UserClaims { Id = user.Id, Role = roles, FullName = user.UserName, RealName = user.RealName, PhotoPath = string.Empty, ReviewerCode = user.ReviewerCode }; } public static UserClaims Create(DoctorAccountDTO doctor) { string[] roles = { "Doctor" }; return new UserClaims { Id = doctor.Id, Role = roles, FullName = doctor.FirstName + doctor.LastName, Phone = doctor.Phone, PhotoPath = string.Empty }; } } }