mirror of
https://github.com/bitwarden/server
synced 2025-12-24 12:13:17 +00:00
35 lines
735 B
C#
35 lines
735 B
C#
#nullable enable
|
|
using Bit.Core.Entities;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.SecretsManager.Entities;
|
|
|
|
public class Secret : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid OrganizationId { get; set; }
|
|
|
|
public string? Key { get; set; }
|
|
|
|
public string? Value { get; set; }
|
|
|
|
public string? Note { get; set; }
|
|
|
|
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
|
|
|
public DateTime RevisionDate { get; set; } = DateTime.UtcNow;
|
|
|
|
public DateTime? DeletedDate { get; set; }
|
|
|
|
public ICollection<Project>? Projects { get; set; }
|
|
|
|
public void SetNewId()
|
|
{
|
|
if (Id == default(Guid))
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|
|
}
|