profileShare

rasmusjy / splitapp-backend-clean-onion

Read-only snapshot

No repository description.

main default branch 429 files Expires Sep 13, 2026, 9:06 AM
Expense.cs 1,250 bytes
1 using System.ComponentModel.DataAnnotations;
2 using App.Domain.Identity;
3 using Base.Domain;
4
5 namespace App.Domain;
6
7 public class Expense : BaseEntity
8 {
9 public Guid TripId { get; set; }
10 public Trip? Trip { get; set; }
11
12 public Guid PaidByUserId { get; set; }
13 public AppUser? PaidByUser { get; set; }
14
15 public Guid? BudgetCategoryId { get; set; }
16 public BudgetCategory? BudgetCategory { get; set; }
17
18 public Guid? CurrencyId { get; set; }
19 public Currency? Currency { get; set; }
20
21 [Display(Name = nameof(Amount), ResourceType = typeof(App.Resources.Domain.Expense))]
22 public decimal Amount { get; set; }
23
24 [MaxLength(500, ErrorMessageResourceType = typeof(App.Resources.Common), ErrorMessageResourceName = "ErrorMaxLength")]
25 [Display(Name = nameof(Description), ResourceType = typeof(App.Resources.Domain.Expense))]
26 public string? Description { get; set; }
27
28 [Display(Name = nameof(ExpenseDate), ResourceType = typeof(App.Resources.Domain.Expense))]
29 public DateTime ExpenseDate { get; set; }
30
31 [Display(Name = nameof(SplitMethod), ResourceType = typeof(App.Resources.Domain.Expense))]
32 public ESplitMethod SplitMethod { get; set; }
33
34 public ICollection<ExpenseSplit>? Splits { get; set; }
35 }
36