From d65ce8288bbda3cb6e0b37613c29d7bf52703ba7 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Fri, 12 Dec 2025 08:56:32 +0100 Subject: Some rework on the ServiceViewer (which will be repurposed for live multi-GTFS serving) --- src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs') 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; } -- cgit v1.3