1
0
mirror of https://github.com/bitwarden/server synced 2025-12-16 08:13:33 +00:00

use EventTableEntity instead of TableEntity

This commit is contained in:
Kyle Spearrin
2017-12-08 14:03:07 -05:00
parent f898b92f87
commit c01fd359f0
14 changed files with 34 additions and 35 deletions

View File

@@ -10,11 +10,11 @@ namespace Bit.Core.Models.Data
{
UserId = userId;
Type = (int)type;
Date = DateTime.UtcNow;
Timestamp = DateTime.UtcNow;
PartitionKey = $"UserId={UserId}";
RowKey = string.Format("Date={0}__Type={1}",
CoreHelpers.DateTimeToTableStorageKey(Timestamp.DateTime), Type);
CoreHelpers.DateTimeToTableStorageKey(Date), Type);
}
public UserEvent(Guid userId, Guid organizationId, EventType type)
@@ -22,11 +22,11 @@ namespace Bit.Core.Models.Data
OrganizationId = organizationId;
UserId = userId;
Type = (int)type;
Timestamp = DateTime.UtcNow;
Date = DateTime.UtcNow;
PartitionKey = $"OrganizationId={OrganizationId}";
RowKey = string.Format("Date={0}__UserId={1}__Type={2}",
CoreHelpers.DateTimeToTableStorageKey(Timestamp.DateTime), UserId, Type);
CoreHelpers.DateTimeToTableStorageKey(Date), UserId, Type);
}
}
}