58 lines
1.5 KiB
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MyCore.DTO.Common;
using System;
using System.Collections.Generic;
namespace MyCore.Models.MyControlPanel
{
/// <summary>
/// Group of devices
/// </summary>
public class Device
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }
[BsonElement("Name")]
public string Name { get; set; }
[BsonElement("ConnectionStatus")]
public ConnectionStatus ConnectionStatus { get; set; }
[BsonElement("Location")]
public Location Location { get; set; }
[BsonElement("MeansOfCommunications")]
public List<MeansOfCommunication> MeansOfCommunications { get; set; }
[BsonElement("CreatedDate")]
public DateTime CreatedDate { get; set; }
[BsonElement("UpdatedDate")]
public DateTime UpdatedDate { get; set; }
[BsonElement("LastMessage")]
public string LastMessage { get; set; } // TODO UNIFORMISATION ?
[BsonElement("LastMessageDate")]
public DateTime LastMessageDate { get; set; }
[BsonElement("Battery")]
public bool Battery { get; set; }
[BsonElement("BatteryStatus")]
public int BatteryStatus { get; set; }
[BsonElement("Provider")]
public Provider provider { get; set; }
[BsonElement("Groups")]
public List<Group> Groups { get; set; }
[BsonElement("Informations")]
public List<Information> Informations { get; set; }
}
}