2022-06-29 19:46:41 -04:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2017-03-07 23:06:14 -05:00
|
|
|
|
using Bit.Core.Utilities;
|
|
|
|
|
|
|
2022-08-29 16:06:55 -04:00
|
|
|
|
namespace Bit.Core.Entities;
|
|
|
|
|
|
|
|
|
|
|
|
public class Collection : ITableObject<Guid>
|
2017-03-07 23:06:14 -05:00
|
|
|
|
{
|
2022-08-29 16:06:55 -04:00
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
|
public Guid OrganizationId { get; set; }
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
[MaxLength(300)]
|
|
|
|
|
|
public string ExternalId { get; set; }
|
|
|
|
|
|
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
|
|
|
|
|
public DateTime RevisionDate { get; set; } = DateTime.UtcNow;
|
2022-08-29 15:53:48 -04:00
|
|
|
|
|
2022-08-29 16:06:55 -04:00
|
|
|
|
public void SetNewId()
|
|
|
|
|
|
{
|
|
|
|
|
|
Id = CoreHelpers.GenerateComb();
|
2017-03-07 23:06:14 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|