Browse Source

Add empty constructors to allow JSON serialization

master
Kenneth Bruen 2 years ago
parent
commit
8ef53a64ad
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 1
      server/Models/Database/StationListing.cs
  2. 1
      server/Models/Database/TrainListing.cs

1
server/Models/Database/StationListing.cs

@ -13,5 +13,6 @@ public record StationListing(
string Name,
List<string> StoppedAtBy
) {
public StationListing() : this(null, "", new()) { }
public StationListing(string name, List<string> stoppedAtBy) : this(null, name, stoppedAtBy) { }
}

1
server/Models/Database/TrainListing.cs

@ -13,5 +13,6 @@ public record TrainListing(
string Number,
string Company
) {
public TrainListing() : this(null, "", "", "") { }
public TrainListing(string rank, string number, string company) : this(null, rank, number, company) { }
}
Loading…
Cancel
Save