aboutsummaryrefslogtreecommitdiff
path: root/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs
blob: cfb144cb267d590eb58f85b7df3808b1d9dfaf77 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace Costasdev.ServiceViewer.Data.Gtfs;

[Table("gtfs_calendar")]
[PrimaryKey(nameof(ServiceId), nameof(FeedId))]
public class GtfsCalendar
{
    [Key]
    [Column("service_id")]
    [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; }

    [Column("tuesday")]
    public bool Tuesday { get; set; }

    [Column("wednesday")]
    public bool Wednesday { get; set; }

    [Column("thursday")]
    public bool Thursday { get; set; }

    [Column("friday")]
    public bool Friday { get; set; }

    [Column("saturday")]
    public bool Saturday { get; set; }

    [Column("sunday")]
    public bool Sunday { get; set; }

    [Column("start_date")]
    public DateOnly StartDate { get; set; }

    [Column("end_date")]
    public DateOnly EndDate { get; set; }
}