new-infofer-scraper/server/Models/Database/StationListing.cs

19 lines
581 B
C#
Raw Normal View History

2022-11-09 05:17:39 +01:00
using System.Collections.Generic;
using System.Text.Json.Serialization;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace Server.Models.Database;
public record StationListing(
[property: BsonId]
[property: BsonRepresentation(BsonType.ObjectId)]
[property: JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
string? Id,
string Name,
List<string> StoppedAtBy
) {
public StationListing() : this(null, "", new()) { }
2022-11-09 05:17:39 +01:00
public StationListing(string name, List<string> stoppedAtBy) : this(null, name, stoppedAtBy) { }
}