wip adjustements finance transaction
This commit is contained in:
parent
ea22124187
commit
0b6ad72116
|
@ -4,19 +4,34 @@ using MapTo;
|
||||||
|
|
||||||
namespace BlueWest.Data
|
namespace BlueWest.Data
|
||||||
{
|
{
|
||||||
|
public enum FinanceTransactionTypeEnum
|
||||||
|
{
|
||||||
|
ConsumerTypeBuy,
|
||||||
|
ConsumerTypeDonate,
|
||||||
|
BusinessIncomePayment
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class FinanceTransactionType
|
||||||
|
{
|
||||||
|
[Key] private FinanceTransactionTypeEnum Type;
|
||||||
|
private string FinanceTransactionDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[MapFrom(typeof(FinanceTransactionInsertDto))]
|
[MapFrom(typeof(FinanceTransactionInsertDto))]
|
||||||
public partial class FinanceTransaction
|
public partial class FinanceTransaction
|
||||||
{
|
{
|
||||||
[Key] public TimeSpan CreationDate { get; set; }
|
[Key] public TimeSpan CreationDate { get; set; }
|
||||||
|
|
||||||
public TimeSpan UserId { get; set; }
|
public TimeSpan UserId { get; set; }
|
||||||
|
|
||||||
public string Currency { get; }
|
public string Currency { get; }
|
||||||
public double Amount { get; } // To Buy
|
|
||||||
public double Quantity { get; } // Bought
|
public FinanceTransactionType FinanceTransactionType {get;}
|
||||||
public double Fee { get; }
|
|
||||||
public TimeSpan UploadedDate { get; }
|
|
||||||
public TimeSpan TransactionDate { get; }
|
|
||||||
|
|
||||||
public FinanceTransaction()
|
public FinanceTransaction()
|
||||||
{
|
{
|
||||||
|
@ -24,16 +39,11 @@ namespace BlueWest.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
|
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
|
||||||
string currency, double amount, double quantity, double fee, TimeSpan uploadedDate, TimeSpan transactionDate)
|
string currency, FinanceTransactionType financeTransactionType)
|
||||||
{
|
{
|
||||||
CreationDate = creationDate;
|
CreationDate = creationDate;
|
||||||
UserId = userId;
|
UserId = userId;
|
||||||
Amount = amount;
|
|
||||||
Quantity = quantity;
|
|
||||||
Fee = fee;
|
|
||||||
Currency = currency;
|
Currency = currency;
|
||||||
UploadedDate = uploadedDate;
|
|
||||||
TransactionDate = transactionDate;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,29 +9,25 @@ namespace BlueWest.Data
|
||||||
|
|
||||||
public partial class FinanceTransactionInsertDto
|
public partial class FinanceTransactionInsertDto
|
||||||
{
|
{
|
||||||
|
public TimeSpan UserId { get; set; }
|
||||||
|
|
||||||
public string Currency { get; }
|
public string Currency { get; }
|
||||||
public double Amount { get; } // To Buy
|
|
||||||
public double Quantity { get; } // Bought
|
public FinanceTransactionType FinanceTransactionType {get;}
|
||||||
public double Fee { get; }
|
|
||||||
public TimeSpan UploadedDate { get; }
|
|
||||||
public TimeSpan TransactionDate { get; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public FinanceTransactionInsertDto(
|
public FinanceTransactionInsertDto(
|
||||||
string currency,
|
TimeSpan userId,
|
||||||
double amount ,
|
string currency ,
|
||||||
double quantity,
|
FinanceTransactionType financeTransactionType
|
||||||
double fee,
|
)
|
||||||
TimeSpan uploadedDate,
|
|
||||||
TimeSpan transactionDate)
|
|
||||||
{
|
{
|
||||||
Currency = currency;
|
Currency = currency;
|
||||||
Amount = amount;
|
UserId = userId;
|
||||||
Quantity = quantity;
|
Currency = currency;
|
||||||
Fee = fee;
|
FinanceTransactionType = financeTransactionType;
|
||||||
UploadedDate = uploadedDate;
|
|
||||||
TransactionDate = transactionDate;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,14 +9,11 @@ namespace BlueWest.Data
|
||||||
|
|
||||||
public partial class FinanceTransactionReadDto
|
public partial class FinanceTransactionReadDto
|
||||||
{
|
{
|
||||||
public TimeSpan CreationDate { get; set; }
|
|
||||||
public TimeSpan UserId { get; set; }
|
public TimeSpan UserId { get; set; }
|
||||||
|
|
||||||
public string Currency { get; }
|
public string Currency { get; }
|
||||||
public double Amount { get; } // To Buy
|
|
||||||
public double Quantity { get; } // Bought
|
public FinanceTransactionType FinanceTransactionType {get;}
|
||||||
public double Fee { get; }
|
|
||||||
public TimeSpan UploadedDate { get; }
|
|
||||||
public TimeSpan TransactionDate { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue