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