Currency creation and minting with basis of transactions
This commit is contained in:
28
src/IO.Swagger/Models/db/Transaction.cs
Normal file
28
src/IO.Swagger/Models/db/Transaction.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IO.Swagger.Models.db
|
||||
{
|
||||
public class Transaction
|
||||
{
|
||||
public int TransactionId { get; set; }
|
||||
public int FromUserId { get; set; }
|
||||
public User FromUser { get; set; }
|
||||
public int ToUserId { get; set; }
|
||||
public User ToUser { get; set; }
|
||||
|
||||
[Range(0.01, float.MaxValue)]
|
||||
public float Amount { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 2)]
|
||||
public string Memo { get; set; }
|
||||
|
||||
public Currency Currency { get; set; }
|
||||
public int CurrencyId { get; set; }
|
||||
|
||||
public DateTime TransactionTime { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user