41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
namespace qtc_api.Dtos.User
|
|
{
|
|
public class UserInformationDto
|
|
{
|
|
public string Id { get; set; } = string.Empty;
|
|
public string Username { get; set; } = string.Empty;
|
|
public string ProfilePicture { get; set; } = string.Empty;
|
|
public string Bio { get; set; } = string.Empty;
|
|
public string Role { get; set; } = string.Empty;
|
|
public DateTime DateOfBirth { get; set; } = new DateTime();
|
|
public DateTime CreatedAt { get; set; } = new DateTime();
|
|
public DateTime LastLogin { get; set; } = new DateTime();
|
|
public int Status { get; set; } = 0;
|
|
public int CurrencyAmount { get; set; } = 0;
|
|
public int ProfileCosmeticId { get; set; } = 0;
|
|
public string TextStatus { get; set; } = string.Empty;
|
|
public string[] Tags { get; set; } = [];
|
|
|
|
public UserInformationDto MapToUser(Models.User user)
|
|
{
|
|
// map what is needed for info
|
|
Id = user.Id;
|
|
Username = user.Username;
|
|
ProfilePicture = user.ProfilePicture;
|
|
Bio = user.Bio;
|
|
Role = user.Role;
|
|
DateOfBirth = user.DateOfBirth;
|
|
CreatedAt = user.CreatedAt;
|
|
LastLogin = user.LastLogin;
|
|
Status = user.Status;
|
|
CurrencyAmount = user.CurrencyAmount;
|
|
ProfileCosmeticId = user.ActiveProfileCosmetic;
|
|
TextStatus = user.TextStatus;
|
|
Tags = user.Tags;
|
|
|
|
// return it
|
|
return this;
|
|
}
|
|
}
|
|
}
|