PIbd-23_Firsov_KA_SUBD/Hotel/HotelMongoDB/Models/MongoServiceCheck.cs
2024-05-29 17:06:07 +04:00

32 lines
990 B
C#

using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelMongoDB.Models
{
public class MongoServiceCheck
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }
public string ReservationId { get; set; } = string.Empty;
public string ServiceId { get; set; } = string.Empty;
public string Count { get; set; } = string.Empty;
public string DateTime { get; set; } = string.Empty;
public MongoServiceCheck(HotelAbstractions.Models.ServiceCheck model, string reservation_id, string service_id)
{
ReservationId = reservation_id;
ServiceId = service_id;
Count = model.Count.ToString();
DateTime = model.DateTime.ToString();
}
public MongoServiceCheck()
{
}
}
}