mirror of
https://github.com/bitwarden/server.git
synced 2025-04-28 08:12:22 -05:00
21 lines
502 B
C#
21 lines
502 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.Entities;
|
|
|
|
public class OrganizationApiKey : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
public Guid OrganizationId { get; set; }
|
|
public OrganizationApiKeyType Type { get; set; }
|
|
[MaxLength(30)]
|
|
public string ApiKey { get; set; }
|
|
public DateTime RevisionDate { get; set; }
|
|
|
|
public void SetNewId()
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|