Doxy, -Wall -Werror, other cleanup and organization first round
This commit is contained in:
@ -1,29 +1,88 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace IO.Swagger.Models.db
|
||||
{
|
||||
/// <summary>
|
||||
/// The basic unit of a transaction
|
||||
/// </summary>
|
||||
public class Transaction
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the transaction identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The transaction identifier.
|
||||
/// </value>
|
||||
public int TransactionId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier of the wallet the money came from.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// From user identifier.
|
||||
/// </value>
|
||||
public int FromUserId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user that the money came from.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// From user.
|
||||
/// </value>
|
||||
public User FromUser { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier of the wallet the money went to.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// From user identifier.
|
||||
/// </value>
|
||||
public int ToUserId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user that the money went to.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// From user.
|
||||
/// </value>
|
||||
public User ToUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the amount exchanged in the transaction.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The amount.
|
||||
/// </value>
|
||||
[Range(0.01, float.MaxValue)]
|
||||
public float Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the memo of the transaction.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The memo.
|
||||
/// </value>
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 2)]
|
||||
public string Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the currency the transaction amount was issued in.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The currency.
|
||||
/// </value>
|
||||
public Currency Currency { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the currency identifier the transaction amount was issued in.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The currency identifier.
|
||||
/// </value>
|
||||
public int CurrencyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time the transaction occured.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The transaction time.
|
||||
/// </value>
|
||||
public DateTime TransactionTime { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user