account-tracking/src/AccountTracking.Api/Models/Transaction.cs

72 lines
2.3 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace AccountTracking.Api.Models;
[Table("transactions")]
public class Transaction
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("account_number")]
[MaxLength(30)]
public string AccountNumber { get; set; } = "";
[Column("booking_date")]
public DateOnly BookingDate { get; set; }
[Column("amount")]
[Precision(15, 2)]
public decimal Amount { get; set; }
[Column("currency")]
[MaxLength(3)]
public string Currency { get; set; } = "CZK";
[Column("balance")]
[Precision(15, 2)]
public decimal Balance { get; set; }
[Column("counter_party_name")]
[MaxLength(255)]
public string? CounterPartyName { get; set; }
[Column("operation_description")]
[MaxLength(255)]
public string? OperationDescription { get; set; }
[Column("message")]
public string? Message { get; set; }
[Column("category")]
[MaxLength(100)]
public string? Category { get; set; }
[Column("variable_symbol")]
[MaxLength(30)]
public string? VariableSymbol { get; set; }
[Column("bank_note")]
[MaxLength(255)]
public string? BankNote { get; set; }
[Column("transaction_id")]
[MaxLength(512)]
public string TransactionId { get; set; } = "";
// Extra CSV columns stored but not used in UI
[Column("counter_bank_code")] [MaxLength(255)] public string? CounterBankCode { get; set; }
[Column("constant_symbol")] [MaxLength(255)] public string? ConstantSymbol { get; set; }
[Column("specific_symbol")] [MaxLength(255)] public string? SpecificSymbol { get; set; }
[Column("order_name")] [MaxLength(255)] public string? OrderName { get; set; }
[Column("exchange_rate")] [MaxLength(255)] public string? ExchangeRate { get; set; }
[Column("e2e_id")] [MaxLength(255)] public string? E2EId { get; set; }
[Column("payer_reference")] [MaxLength(255)] public string? PayerReference { get; set; }
[Column("original_payer")] [MaxLength(255)] public string? OriginalPayer { get; set; }
[Column("final_recipient")] [MaxLength(255)] public string? FinalRecipient { get; set; }
[Column("original_transaction")] [MaxLength(255)] public string? OriginalTransaction { get; set; }
}