2023-01-13 15:02:53 +01:00
|
|
|
|
#nullable enable
|
2023-01-24 19:57:28 +01:00
|
|
|
|
using Bit.Core.Entities;
|
2023-01-13 15:02:53 +01:00
|
|
|
|
using Bit.Core.Utilities;
|
|
|
|
|
|
|
2023-01-24 19:57:28 +01:00
|
|
|
|
namespace Bit.Core.SecretsManager.Entities;
|
2023-01-13 15:02:53 +01:00
|
|
|
|
|
|
|
|
|
|
public class Project : 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 DateTime? DeletedDate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public virtual ICollection<Secret>? Secrets { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public void SetNewId()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Id == default(Guid))
|
|
|
|
|
|
{
|
|
|
|
|
|
Id = CoreHelpers.GenerateComb();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|