2024-10-26 02:23:33 +02:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace WatchIt.Common.Model.Accounts;
|
|
|
|
|
|
2024-11-03 23:01:34 +01:00
|
|
|
public class AccountProfileInfoRequest
|
2024-10-26 02:23:33 +02:00
|
|
|
{
|
|
|
|
|
#region PROPERTIES
|
2024-11-03 23:01:34 +01:00
|
|
|
|
|
|
|
|
[JsonPropertyName("description")]
|
|
|
|
|
public string? Description { get; set; }
|
2024-10-26 02:23:33 +02:00
|
|
|
|
|
|
|
|
[JsonPropertyName("gender_id")]
|
2024-10-27 20:22:55 +01:00
|
|
|
public short? GenderId { get; set; }
|
2024-10-26 02:23:33 +02:00
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-03 23:01:34 +01:00
|
|
|
#region CONSTRUCTORS
|
|
|
|
|
|
|
|
|
|
public AccountProfileInfoRequest() { }
|
|
|
|
|
|
|
|
|
|
public AccountProfileInfoRequest(AccountResponse accountResponse)
|
|
|
|
|
{
|
|
|
|
|
Description = accountResponse.Description;
|
|
|
|
|
GenderId = accountResponse.Gender?.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-26 02:23:33 +02:00
|
|
|
#region PUBLIC METHODS
|
|
|
|
|
|
|
|
|
|
public void UpdateAccount(Database.Model.Account.Account account)
|
|
|
|
|
{
|
|
|
|
|
account.Description = Description;
|
|
|
|
|
account.GenderId = GenderId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|