TripParticipant.cs
774 bytes
| 1 | using System.ComponentModel.DataAnnotations; |
|---|---|
| 2 | using System.ComponentModel.DataAnnotations.Schema; |
| 3 | using SplitApp.Modules.Trips.Domain.Enums; |
| 4 | using SplitApp.Shared.Contracts.Users; |
| 5 | using SplitApp.Shared.Kernel.Domain; |
| 6 | |
| 7 | namespace SplitApp.Modules.Trips.Domain.Entities; |
| 8 | |
| 9 | public class TripParticipant : BaseEntity |
| 10 | { |
| 11 | public Guid TripId { get; set; } |
| 12 | public Trip? Trip { get; set; } |
| 13 | |
| 14 | public Guid UserId { get; set; } |
| 15 | [NotMapped] public UserDto? User { get; set; } |
| 16 | |
| 17 | public EParticipantRole Role { get; set; } = EParticipantRole.Participant; |
| 18 | |
| 19 | [MaxLength(100)] |
| 20 | public string? Nickname { get; set; } |
| 21 | |
| 22 | public DateTime JoinedAt { get; set; } = DateTime.UtcNow; |
| 23 | |
| 24 | public DateTime? LeftAt { get; set; } |
| 25 | |
| 26 | public bool IsActive { get; set; } = true; |
| 27 | } |
| 28 | |