mirror of
https://github.com/bitwarden/server
synced 2026-01-03 17:14:00 +00:00
[SM-1591] Adding SecretVersion table to server (#6406)
* Adding SecretVersion table to server * making the names singular not plural for new table * removing migration * fixing migration * Adding indexes for serviceacct and orguserId * indexes for sqllite * fixing migrations * adding indexes to secretVeriosn.sql * tests * removing tests * adding GO
This commit is contained in:
28
src/Core/SecretsManager/Entities/SecretVersion.cs
Normal file
28
src/Core/SecretsManager/Entities/SecretVersion.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
#nullable enable
|
||||
using Bit.Core.Entities;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.SecretsManager.Entities;
|
||||
|
||||
public class SecretVersion : ITableObject<Guid>
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid SecretId { get; set; }
|
||||
|
||||
public string Value { get; set; } = string.Empty;
|
||||
|
||||
public DateTime VersionDate { get; set; }
|
||||
|
||||
public Guid? EditorServiceAccountId { get; set; }
|
||||
|
||||
public Guid? EditorOrganizationUserId { get; set; }
|
||||
|
||||
public void SetNewId()
|
||||
{
|
||||
if (Id == default(Guid))
|
||||
{
|
||||
Id = CoreHelpers.GenerateComb();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user