-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactor transaction related apis
- Loading branch information
Showing
27 changed files
with
1,211 additions
and
2,149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nsactionCsv/GetAllTransactionsResponse.cs → ...Transaction/GetAllTransactionsResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
...TOs/TransactionCsv/TransactionCsvModel.cs → ...n/DTOs/Transaction/TransactionCsvModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
using Application.Services.SharedService; | ||
using CsvHelper.Configuration.Attributes; | ||
|
||
namespace Application.DTOs.TransactionCsv; | ||
|
||
public class TransactionCsvModel | ||
{ | ||
public long TransactionID { get; set; } | ||
public long SourceAcount { get; set; } | ||
public long DestiantionAccount { get; set; } | ||
public decimal Amount { get; set; } | ||
[TypeConverter(typeof(PersianDateConverter))] | ||
public DateTime Date { get; set; } | ||
public string Type { get; set; } = string.Empty; | ||
using Application.Services.SharedService; | ||
using CsvHelper.Configuration.Attributes; | ||
|
||
namespace Application.DTOs.Transaction; | ||
|
||
public class TransactionCsvModel | ||
{ | ||
public long TransactionID { get; set; } | ||
public long SourceAcount { get; set; } | ||
public long DestiantionAccount { get; set; } | ||
public decimal Amount { get; set; } | ||
[TypeConverter(typeof(PersianDateConverter))] | ||
public DateTime Date { get; set; } | ||
public string Type { get; set; } = string.Empty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
using Application.DTOs; | ||
using Application.DTOs.TransactionCsv; | ||
using Application.DTOs.Transaction; | ||
|
||
namespace Application.Interfaces.Services; | ||
|
||
public interface ITransactionService | ||
{ | ||
Task AddTransactionsFromCsvAsync(string filePath); | ||
Task<Result<GetAllTransactionsResponse>> GetAllTransactions(); | ||
Task<Result<GetAllTransactionsResponse>> GetAllTransactionsAsync(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Domain.Entities; | ||
[Table("Transactions")] | ||
public class Transaction | ||
{ | ||
[Key] | ||
public long TransactionId { get; set; } | ||
public long SourceAccountId { get; set; } | ||
public Account SourceAccount { get; set; } | ||
public Account? SourceAccount { get; set; } | ||
public long DestinationAccountId { get; set; } | ||
public Account DestinationAccount { get; set; } | ||
public Account? DestinationAccount { get; set; } | ||
public decimal Amount { get; set; } | ||
public DateTime Date { get; set; } | ||
[MaxLength(50)] | ||
public string Type { get; set; } = String.Empty; | ||
} |
Oops, something went wrong.