2022-11-09 05:17:39 +01:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
using MongoDB.Bson;
|
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
|
|
|
|
namespace Server.Models.Database;
|
|
|
|
|
|
|
|
public record TrainListing(
|
|
|
|
[property: BsonId]
|
|
|
|
[property: BsonRepresentation(BsonType.ObjectId)]
|
|
|
|
[property: JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
|
|
string? Id,
|
|
|
|
string Rank,
|
|
|
|
string Number,
|
|
|
|
string Company
|
|
|
|
) {
|
2022-11-09 07:05:32 +01:00
|
|
|
public TrainListing() : this(null, "", "", "") { }
|
2022-11-09 05:17:39 +01:00
|
|
|
public TrainListing(string rank, string number, string company) : this(null, rank, number, company) { }
|
|
|
|
}
|