CodeLiturgy.Dashboard/BlueWest.Data/Finance/FinanceTransaction.cs

56 lines
1.3 KiB
C#
Raw Normal View History

2021-12-06 02:49:27 +03:00
using System;
2022-08-04 03:59:04 +03:00
using System.ComponentModel.DataAnnotations;
2021-12-06 19:08:31 +03:00
using MapTo;
2021-12-06 02:49:27 +03:00
namespace BlueWest.Data
{
2022-08-13 03:53:22 +03:00
public enum FinanceTransactionTypeEnum
{
ConsumerTypeBuy,
ConsumerTypeDonate,
2022-08-13 05:32:57 +03:00
BusinessIncomePayment,
BankTransferPayment
2022-08-13 03:53:22 +03:00
}
public class FinanceTransactionType
{
[Key] private FinanceTransactionTypeEnum Type;
2022-08-13 05:32:57 +03:00
private string FinanceTransactionTypeDescription;
2022-08-13 03:53:22 +03:00
}
2021-12-06 02:49:27 +03:00
2022-08-13 05:32:57 +03:00
public enum MathOperationType
{
Add,
Sub,
Div,
Mul
}
2021-12-10 03:04:48 +03:00
[MapFrom(typeof(FinanceTransactionInsertDto))]
2022-08-04 03:59:04 +03:00
public partial class FinanceTransaction
2021-12-06 02:49:27 +03:00
{
2022-08-04 03:59:04 +03:00
[Key] public TimeSpan CreationDate { get; set; }
2022-08-13 03:53:22 +03:00
2022-08-04 03:59:04 +03:00
public TimeSpan UserId { get; set; }
2022-08-01 00:09:39 +03:00
2022-08-04 03:59:04 +03:00
public string Currency { get; }
2022-08-13 03:53:22 +03:00
public FinanceTransactionType FinanceTransactionType {get;}
2022-08-13 05:32:57 +03:00
private string FinanceTransactionDescription;
2022-08-13 03:53:22 +03:00
2021-12-06 02:49:27 +03:00
2022-08-04 03:59:04 +03:00
public FinanceTransaction()
{
}
2021-12-06 02:49:27 +03:00
2022-08-01 00:09:39 +03:00
public FinanceTransaction(TimeSpan creationDate, TimeSpan userId,
2022-08-13 03:53:22 +03:00
string currency, FinanceTransactionType financeTransactionType)
2021-12-06 02:49:27 +03:00
{
2022-08-01 00:09:39 +03:00
CreationDate = creationDate;
2021-12-06 02:49:27 +03:00
UserId = userId;
2022-08-01 00:09:39 +03:00
Currency = currency;
2021-12-06 02:49:27 +03:00
}
}
}