You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
504 B
17 lines
504 B
2 years ago
|
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
|
||
|
) {
|
||
|
public TrainListing(string rank, string number, string company) : this(null, rank, number, company) { }
|
||
|
}
|