Files
server/src/Core/Models/Api/Response/EventResponseModel.cs

45 lines
1.4 KiB
C#
Raw Normal View History

2017-12-14 12:33:50 -05:00
using System;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
namespace Bit.Core.Models.Api
{
public class EventResponseModel : ResponseModel
{
public EventResponseModel(IEvent ev)
: base("event")
{
if (ev == null)
2017-12-14 12:33:50 -05:00
{
throw new ArgumentNullException(nameof(ev));
}
Type = ev.Type;
UserId = ev.UserId;
OrganizationId = ev.OrganizationId;
CipherId = ev.CipherId;
CollectionId = ev.CollectionId;
GroupId = ev.GroupId;
2020-01-15 09:43:49 -05:00
PolicyId = ev.PolicyId;
2017-12-14 12:33:50 -05:00
OrganizationUserId = ev.OrganizationUserId;
ActingUserId = ev.ActingUserId;
Date = ev.Date;
DeviceType = ev.DeviceType;
IpAddress = ev.IpAddress;
2017-12-14 12:33:50 -05:00
}
public EventType Type { get; set; }
public Guid? UserId { get; set; }
public Guid? OrganizationId { get; set; }
public Guid? CipherId { get; set; }
public Guid? CollectionId { get; set; }
public Guid? GroupId { get; set; }
2020-01-15 09:43:49 -05:00
public Guid? PolicyId { get; set; }
2017-12-14 12:33:50 -05:00
public Guid? OrganizationUserId { get; set; }
public Guid? ActingUserId { get; set; }
public DateTime Date { get; set; }
public DeviceType? DeviceType { get; set; }
public string IpAddress { get; set; }
2017-12-14 12:33:50 -05:00
}
}