mirror of
https://github.com/bitwarden/server
synced 2025-12-16 08:13:33 +00:00
organize event models. stub out event services
This commit is contained in:
30
src/Core/Models/Data/UserEvent.cs
Normal file
30
src/Core/Models/Data/UserEvent.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class UserEvent : EventTableEntity
|
||||
{
|
||||
public UserEvent(Guid userId, EventType type)
|
||||
{
|
||||
PartitionKey = $"UserId={userId}";
|
||||
RowKey = string.Format("Date={0}__Type={1}",
|
||||
CoreHelpers.DateTimeToTableStorageKey(), type);
|
||||
|
||||
UserId = userId;
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public UserEvent(Guid userId, Guid organizationId, EventType type)
|
||||
{
|
||||
PartitionKey = $"OrganizationId={organizationId}";
|
||||
RowKey = string.Format("Date={0}__UserId={1}__Type={2}",
|
||||
CoreHelpers.DateTimeToTableStorageKey(), userId, type);
|
||||
|
||||
OrganizationId = organizationId;
|
||||
UserId = userId;
|
||||
Type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user