2022-06-29 19:46:41 -04:00
|
|
|
|
using Bit.Core.Context;
|
2017-12-08 23:09:50 -05:00
|
|
|
|
using Bit.Core.Enums;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Models.Data;
|
2022-08-29 14:53:16 -04:00
|
|
|
|
|
2017-12-08 23:09:50 -05:00
|
|
|
|
public class EventMessage : IEvent
|
2022-08-29 16:06:55 -04:00
|
|
|
|
{
|
2017-12-08 23:09:50 -05:00
|
|
|
|
public EventMessage() { }
|
2022-08-29 15:53:48 -04:00
|
|
|
|
|
2017-12-08 23:09:50 -05:00
|
|
|
|
public EventMessage(ICurrentContext currentContext)
|
2021-06-30 09:35:26 +02:00
|
|
|
|
: base()
|
2017-12-08 23:09:50 -05:00
|
|
|
|
{
|
|
|
|
|
|
IpAddress = currentContext.IpAddress;
|
|
|
|
|
|
DeviceType = currentContext.DeviceType;
|
2022-08-29 15:53:48 -04:00
|
|
|
|
}
|
2022-08-29 16:06:55 -04:00
|
|
|
|
|
2017-12-08 23:09:50 -05:00
|
|
|
|
public DateTime Date { get; set; }
|
|
|
|
|
|
public EventType Type { get; set; }
|
|
|
|
|
|
public Guid? UserId { get; set; }
|
|
|
|
|
|
public Guid? OrganizationId { get; set; }
|
2022-05-10 17:12:09 -04:00
|
|
|
|
public Guid? InstallationId { get; set; }
|
2021-06-30 09:35:26 +02:00
|
|
|
|
public Guid? ProviderId { get; set; }
|
2017-12-08 23:09:50 -05:00
|
|
|
|
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-08 23:09:50 -05:00
|
|
|
|
public Guid? OrganizationUserId { get; set; }
|
2021-06-30 09:35:26 +02:00
|
|
|
|
public Guid? ProviderUserId { get; set; }
|
2021-07-21 19:40:38 +02:00
|
|
|
|
public Guid? ProviderOrganizationId { get; set; }
|
2017-12-08 23:09:50 -05:00
|
|
|
|
public Guid? ActingUserId { get; set; }
|
|
|
|
|
|
public DeviceType? DeviceType { get; set; }
|
2017-12-15 10:50:06 -05:00
|
|
|
|
public string IpAddress { get; set; }
|
2019-03-19 17:12:55 -04:00
|
|
|
|
public Guid? IdempotencyId { get; private set; } = Guid.NewGuid();
|
2017-12-08 23:09:50 -05:00
|
|
|
|
}
|