PIbd-23_Firsov_KA_SUBD/Hotel/HotelMongoDB/Models/MongoRoom.cs

42 lines
1.1 KiB
C#
Raw Normal View History

2024-05-29 17:06:07 +04:00
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 MongoRoom
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }
public string HotelId { get; set; } = string.Empty;
public string Category { get; set; } = string.Empty;
public string CountPlace { get; set; } = string.Empty;
public string Flor { get; set; } = string.Empty;
public string Number { get; set; } = string.Empty;
public string Price { get; set; } = string.Empty;
public MongoRoom(HotelAbstractions.Models.Room model, string hotel_id)
{
HotelId = hotel_id;
Category = model.Category;
CountPlace = model.CountPlace.ToString();
Flor = model.Flor.ToString();
Number = model.Number;
Price = model.Price.ToString();
}
public MongoRoom()
{
}
}
}