TripPoll.cs
1,085 bytes
| 1 | using System.ComponentModel.DataAnnotations; |
|---|---|
| 2 | using App.Domain.Identity; |
| 3 | using Base.Domain; |
| 4 | |
| 5 | namespace App.Domain; |
| 6 | |
| 7 | public class TripPoll : BaseEntity |
| 8 | { |
| 9 | public Guid TripId { get; set; } |
| 10 | public Trip? Trip { get; set; } |
| 11 | |
| 12 | public Guid CreatedByUserId { get; set; } |
| 13 | public AppUser? CreatedByUser { get; set; } |
| 14 | |
| 15 | [MaxLength(500, ErrorMessageResourceType = typeof(App.Resources.Common), ErrorMessageResourceName = "ErrorMaxLength")] |
| 16 | [Display(Name = nameof(Question), ResourceType = typeof(App.Resources.Domain.TripPoll))] |
| 17 | public string Question { get; set; } = default!; |
| 18 | |
| 19 | [Display(Name = nameof(AllowMultipleVotes), ResourceType = typeof(App.Resources.Domain.TripPoll))] |
| 20 | public bool AllowMultipleVotes { get; set; } |
| 21 | |
| 22 | [Display(Name = nameof(IsAnonymous), ResourceType = typeof(App.Resources.Domain.TripPoll))] |
| 23 | public bool IsAnonymous { get; set; } |
| 24 | |
| 25 | [Display(Name = nameof(ClosedAt), ResourceType = typeof(App.Resources.Domain.TripPoll))] |
| 26 | public DateTime? ClosedAt { get; set; } |
| 27 | |
| 28 | public ICollection<TripPollOption>? Options { get; set; } |
| 29 | } |
| 30 | |