-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Including file that was missed in earlier commits/pushes
- Loading branch information
1 parent
3dc1bee
commit ea8ab17
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
TransactionService/TransactionService/Models/Transaction.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace TransactionService.Models | ||
{ | ||
public class Transaction | ||
{ | ||
[Required] | ||
public decimal? Amount { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
[Required] | ||
public bool? WasPlanned { get; set; } | ||
|
||
[Required] | ||
public bool? WasNecessary { get; set; } | ||
|
||
public Data_Access.Transaction ToDataAccessTransaction() | ||
{ | ||
return new Data_Access.Transaction | ||
{ | ||
Amount = Amount.Value, | ||
Description = Description, | ||
WasNecessary = WasNecessary.Value, | ||
WasPlanned = WasPlanned.Value | ||
}; | ||
} | ||
} | ||
} |