ExpenseDto.cs
1,656 bytes
| 1 | namespace SplitApp.Modules.Expenses.Api.Dto.v1; |
|---|---|
| 2 | |
| 3 | public class ExpenseDto |
| 4 | { |
| 5 | public Guid Id { get; set; } |
| 6 | public Guid TripId { get; set; } |
| 7 | public Guid PaidByUserId { get; set; } |
| 8 | public string? PaidByUserName { get; set; } |
| 9 | public Guid? BudgetCategoryId { get; set; } |
| 10 | public string? BudgetCategoryName { get; set; } |
| 11 | public Guid? CurrencyId { get; set; } |
| 12 | public string? CurrencyCode { get; set; } |
| 13 | public string? CurrencySymbol { get; set; } |
| 14 | public decimal Amount { get; set; } |
| 15 | public decimal? AmountInTripCurrency { get; set; } |
| 16 | public string? Description { get; set; } |
| 17 | public DateTime ExpenseDate { get; set; } |
| 18 | public string SplitMethod { get; set; } = default!; |
| 19 | public List<ExpenseSplitDto>? Splits { get; set; } |
| 20 | } |
| 21 | |
| 22 | public class ExpenseSplitDto |
| 23 | { |
| 24 | public Guid Id { get; set; } |
| 25 | public Guid UserId { get; set; } |
| 26 | public string? UserName { get; set; } |
| 27 | public decimal Amount { get; set; } |
| 28 | public decimal? Percentage { get; set; } |
| 29 | } |
| 30 | |
| 31 | public class ExpenseCreateDto |
| 32 | { |
| 33 | public Guid TripId { get; set; } |
| 34 | public Guid PaidByUserId { get; set; } |
| 35 | public Guid? CurrencyId { get; set; } |
| 36 | public Guid? BudgetCategoryId { get; set; } |
| 37 | public decimal Amount { get; set; } |
| 38 | public string? Description { get; set; } |
| 39 | public DateTime ExpenseDate { get; set; } |
| 40 | public string SplitMethod { get; set; } = "EqualAll"; |
| 41 | public IList<ExpenseSplitCreateDto> Splits { get; set; } = new List<ExpenseSplitCreateDto>(); |
| 42 | } |
| 43 | |
| 44 | public class ExpenseSplitCreateDto |
| 45 | { |
| 46 | public Guid UserId { get; set; } |
| 47 | public decimal Amount { get; set; } |
| 48 | public decimal? Percentage { get; set; } |
| 49 | } |
| 50 | |