new-infofer-scraper/server/Models/Database/StationAlias.cs
Dan Cojocaru 9e680e3bb2
Use Newtonsoft.Json instead of System.Text.Json
Fixed bug related to serializing properties inherited from interface
2023-09-03 04:31:41 +03:00

17 lines
472 B
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
namespace Server.Models.Database;
public record StationAlias(
[property: BsonId]
[property: BsonRepresentation(BsonType.ObjectId)]
[property: JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
string? Id,
string Name,
[property: BsonRepresentation(BsonType.ObjectId)]
string? ListingId
) {
public StationAlias() : this(null, "", null) { }
}