mirror of
https://github.com/bitwarden/server.git
synced 2025-06-25 21:28:47 -05:00
28 lines
561 B
C#
28 lines
561 B
C#
#nullable enable
|
|
using Bit.Core.Entities;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.SecretsManager.Entities;
|
|
|
|
public class ServiceAccount : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid OrganizationId { get; set; }
|
|
|
|
public string? Name { get; set; }
|
|
|
|
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
|
|
|
public DateTime RevisionDate { get; set; } = DateTime.UtcNow;
|
|
|
|
public void SetNewId()
|
|
{
|
|
if (Id == default(Guid))
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|
|
|
|
}
|