2022-11-09 05:17:39 +01:00
|
|
|
using MongoDB.Bson;
|
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
2023-09-03 04:13:26 +03:00
|
|
|
using Newtonsoft.Json;
|
2022-11-09 05:17:39 +01:00
|
|
|
|
|
|
|
namespace Server.Models.Database;
|
|
|
|
|
|
|
|
public record TrainListing(
|
|
|
|
[property: BsonId]
|
|
|
|
[property: BsonRepresentation(BsonType.ObjectId)]
|
2023-09-03 04:13:26 +03:00
|
|
|
[property: JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
2022-11-09 05:17:39 +01:00
|
|
|
string? Id,
|
|
|
|
string Rank,
|
|
|
|
string Number,
|
2022-11-15 19:46:07 +01:00
|
|
|
string Company,
|
|
|
|
[property: BsonRepresentation(BsonType.ObjectId)]
|
|
|
|
string? LatestDescription
|
2022-11-09 05:17:39 +01:00
|
|
|
) {
|
2022-11-15 19:46:07 +01:00
|
|
|
public TrainListing() : this(null, "", "", "", null) { }
|
|
|
|
public TrainListing(string rank, string number, string company) : this(null, rank, number, company, null) { }
|
2022-11-09 05:17:39 +01:00
|
|
|
}
|