aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs')
-rw-r--r--src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs
new file mode 100644
index 0000000..e9b5a92
--- /dev/null
+++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums;
+using Microsoft.EntityFrameworkCore;
+
+namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs;
+
+[Table("gtfs_calendar_dates")]
+[PrimaryKey(nameof(ServiceId), nameof(Date), nameof(FeedId))]
+public class GtfsCalendarDate
+{
+ [Column("service_id")]
+ [MaxLength(32)]
+ public required string ServiceId { get; set; }
+
+ [Column("date")]
+ public required DateTime Date { get; set; }
+
+ [Column("feed_id")] public int FeedId { get; set; }
+ [ForeignKey(nameof(FeedId))] public required Feed Feed { get; set; }
+
+ [Column("exception_type")]
+ public required ExceptionType ExceptionType { get; set; }
+}