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 { /// /// Provider of a device (provider of informations) - e.g. : Meross, Arlo, IoThomas, ... /// public class Provider { [BsonId] [BsonRepresentation(BsonType.ObjectId)] public string Id { get; set; } [BsonElement("Name")] [BsonRequired] public string Name { get; set; } [BsonElement("Username")] [BsonRequired] public string Username { get; set; } [BsonElement("Password")] [BsonRequired] public string Password { get; set; } // TODO ENCRYPTED [BsonElement("ApiKey")] public string ApiKey { get; set; } // TODO ENCRYPTED public ProviderDTO ToDTO() { return new ProviderDTO() { Id = Id, Name = Name }; } } }