SplitPreset.cs
989 bytes
| 1 | using System.ComponentModel.DataAnnotations; |
|---|---|
| 2 | using System.ComponentModel.DataAnnotations.Schema; |
| 3 | using SplitApp.Modules.Expenses.Domain.Enums; |
| 4 | using SplitApp.Shared.Contracts.Users; |
| 5 | using SplitApp.Shared.Kernel.Domain; |
| 6 | |
| 7 | namespace SplitApp.Modules.Expenses.Domain.Entities; |
| 8 | |
| 9 | public class SplitPreset : BaseEntity |
| 10 | { |
| 11 | /// <summary>FK to trips.Trip.</summary> |
| 12 | public Guid TripId { get; set; } |
| 13 | /// <summary>Cross-module nav — populated by WebApp facade, never by EF (NotMapped).</summary> |
| 14 | [NotMapped] public object? Trip { get; set; } |
| 15 | |
| 16 | [MaxLength(200)] |
| 17 | public string Name { get; set; } = default!; |
| 18 | |
| 19 | public ESplitMethod SplitMethod { get; set; } |
| 20 | |
| 21 | /// <summary>FK to users.AspNetUsers.</summary> |
| 22 | public Guid CreatedById { get; set; } |
| 23 | /// <summary>Cross-module nav — populated by WebApp facade, never by EF (NotMapped).</summary> |
| 24 | [NotMapped] public UserDto? CreatedBy { get; set; } |
| 25 | |
| 26 | public ICollection<SplitPresetMember>? Members { get; set; } |
| 27 | } |
| 28 | |