aboutsummaryrefslogtreecommitdiff
path: root/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs
blob: 1543ef52c84895694d32b7e6e22f789ad8ade3b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Costasdev.ServiceViewer.Data.Gtfs.Enums;
using Microsoft.EntityFrameworkCore;

namespace Costasdev.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; }
}