1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 13:38:13 -05:00
bitwarden/src/Api/Models/Response/DeviceResponseModel.cs

31 lines
801 B
C#

using System;
using Bit.Core.Domains;
using Bit.Core.Enums;
namespace Bit.Api.Models
{
public class DeviceResponseModel : ResponseModel
{
public DeviceResponseModel(Device device)
: base("device")
{
if(device == null)
{
throw new ArgumentNullException(nameof(device));
}
Id = device.Id.ToString();
Name = device.Name;
Type = device.Type;
Identifier = device.Identifier;
CreationDate = device.CreationDate;
}
public string Id { get; set; }
public string Name { get; set; }
public DeviceType Type { get; set; }
public string Identifier { get; set; }
public DateTime CreationDate { get; set; }
}
}