SettlementPlan.cs
1,015 bytes
| 1 | using System.ComponentModel.DataAnnotations.Schema; |
|---|---|
| 2 | using SplitApp.Modules.Expenses.Domain.Enums; |
| 3 | using SplitApp.Modules.Users.Domain.Entities; |
| 4 | using SplitApp.Shared.Kernel.Domain; |
| 5 | |
| 6 | namespace SplitApp.Modules.Expenses.Domain.Entities; |
| 7 | |
| 8 | public class SettlementPlan : BaseEntity |
| 9 | { |
| 10 | /// <summary>FK to trips.Trip.</summary> |
| 11 | public Guid TripId { get; set; } |
| 12 | /// <summary>Cross-module nav — populated by WebApp facade, never by EF (NotMapped).</summary> |
| 13 | [NotMapped] public object? Trip { get; set; } |
| 14 | |
| 15 | /// <summary>FK to users.AspNetUsers.</summary> |
| 16 | public Guid CreatedByUserId { get; set; } |
| 17 | /// <summary>Cross-module nav — populated by WebApp facade, never by EF (NotMapped).</summary> |
| 18 | [NotMapped] public AppUser? CreatedByUser { get; set; } |
| 19 | |
| 20 | public decimal TotalAmount { get; set; } |
| 21 | |
| 22 | public ESettlementStatus Status { get; set; } = ESettlementStatus.Pending; |
| 23 | |
| 24 | public DateTime? CompletedAt { get; set; } |
| 25 | |
| 26 | public ICollection<SettlementPayment>? Payments { get; set; } |
| 27 | } |
| 28 | |