diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-12 08:56:32 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-12-12 10:24:53 +0100 |
| commit | d65ce8288bbda3cb6e0b37613c29d7bf52703ba7 (patch) | |
| tree | f6aaf58bbebeaa9b147e895ff8a5388881fa51d8 /src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs | |
| parent | 661cccc2da9a6c32b7b56c60313787282a9084ea (diff) | |
Some rework on the ServiceViewer (which will be repurposed for live multi-GTFS serving)
Diffstat (limited to 'src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs')
| -rw-r--r-- | src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs b/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs index 56f3f85..cfb144c 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs +++ b/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs @@ -1,9 +1,11 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; namespace Costasdev.ServiceViewer.Data.Gtfs; -[Table("calendar")] +[Table("gtfs_calendar")] +[PrimaryKey(nameof(ServiceId), nameof(FeedId))] public class GtfsCalendar { [Key] @@ -11,6 +13,9 @@ public class GtfsCalendar [MaxLength(32)] public string ServiceId { get; set; } = null!; + [Column("feed_id")] public int FeedId { get; set; } + [ForeignKey(nameof(FeedId))] public required Feed Feed { get; set; } + [Column("monday")] public bool Monday { get; set; } |
