1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-15 15:30:49 -05:00
bitwarden/src/Core/Entities/Collection.cs
Jared McCannon 84e5ea1265
[PM-22097] Add Columns to Collections for Org User Default Collection (#5908)
* Adding columns and database migrations for organization DefaultUserCollection.
2025-06-09 13:50:15 -05:00

26 lines
736 B
C#

using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
using Bit.Core.Utilities;
#nullable enable
namespace Bit.Core.Entities;
public class Collection : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid OrganizationId { get; set; }
public string Name { get; set; } = null!;
[MaxLength(300)]
public string? ExternalId { get; set; }
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
public DateTime RevisionDate { get; set; } = DateTime.UtcNow;
public CollectionType Type { get; set; } = CollectionType.SharedCollection;
public string? DefaultUserCollectionEmail { get; set; }
public void SetNewId()
{
Id = CoreHelpers.GenerateComb();
}
}