42 lines
1.1 KiB
C#
42 lines
1.1 KiB
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 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()
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|