using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using HotelAbstractions.Models; namespace HotelMongoDB.Models { public class MongoGuest { [BsonId] [BsonRepresentation(BsonType.ObjectId)] public string Id { get; set; } public string FIO { get; set; } = string.Empty; public string PhoneNumber { get; set; } = string.Empty; public string BirthDate { get; set; } = string.Empty; public string PassportId { get; set; } = string.Empty; public string Gender { get; set; } = string.Empty; public MongoGuest(HotelAbstractions.Models.Guest model) { FIO = model.FIO; PhoneNumber = model.PhoneNumber; BirthDate = model.BirthDate.ToString("d"); PassportId = model.PassportId; Gender = model.Gender.ToString(); } public MongoGuest() { } } }