79 lines
2.3 KiB
C#
79 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace IO.Swagger.Models.db
|
|
{
|
|
/// <summary>
|
|
/// The basic representation of a user
|
|
/// </summary>
|
|
public class User
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the identifier.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The identifier.
|
|
/// </value>
|
|
public int Id { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the email of the user.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The email.
|
|
/// </value>
|
|
public string Email { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the first name of the user.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The first name.
|
|
/// </value>
|
|
[StringLength(32, MinimumLength = 3)]
|
|
public string FirstName { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the last name of the user.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The last name.
|
|
/// </value>
|
|
[StringLength(32, MinimumLength = 3)]
|
|
public string LastName { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the hashed and salted equivalent of the users password.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The password hash.
|
|
/// </value>
|
|
public string PasswordHash { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the randomly generated salt of the users password.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The salt.
|
|
/// </value>
|
|
public string Salt { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the currencies the user has created.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The currencies.
|
|
/// </value>
|
|
public ICollection<Currency> Currencies { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the transactions from the user.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The transactions from.
|
|
/// </value>
|
|
public ICollection<Transaction> TransactionsFrom { get; set; }
|
|
/// <summary>
|
|
/// Gets or sets the transactions to the user.
|
|
/// </summary>
|
|
/// <value>
|
|
/// The transactions to.
|
|
/// </value>
|
|
public ICollection<Transaction> TransactionsTo { get; set; }
|
|
}
|
|
|
|
}
|