mirror of
https://bitbucket.org/myhomie/mycorerepository.git
synced 2025-12-06 09:41:19 +00:00
36 lines
801 B
C#
36 lines
801 B
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using MyCore.DTO.Common;
|
|
using MyCore.DTO.MyControlPanel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
namespace MyCore.Models.MyControlPanel
|
|
{
|
|
/// <summary>
|
|
/// Group of devices
|
|
/// </summary>
|
|
public class Group
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; set; }
|
|
|
|
[BsonElement("Name")]
|
|
[BsonRequired]
|
|
public string Name { get; set; }
|
|
|
|
[BsonElement("Devices")]
|
|
public List<string> Devices { get; set; }
|
|
|
|
public GroupDTO ToDTO()
|
|
{
|
|
return new GroupDTO()
|
|
{
|
|
Id = Id,
|
|
Name = Name,
|
|
Devices = Devices
|
|
};
|
|
}
|
|
}
|
|
}
|