Files
server/src/Core/Entities/Collection.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
546 B
C#
Raw Normal View History

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 16:06:55 -04:00
public void SetNewId()
{
Id = CoreHelpers.GenerateComb();
2017-03-07 23:06:14 -05:00
}
}