mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 05:28:15 -05:00
32 lines
1002 B
C#
32 lines
1002 B
C#
using System;
|
|
using Bit.Core.Utilities;
|
|
using Bit.Core.Enums;
|
|
|
|
namespace Bit.Core.Models.Table
|
|
{
|
|
public class Organization : IDataObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string Name { get; set; }
|
|
public string BusinessName { get; set; }
|
|
public string BillingEmail { get; set; }
|
|
public string Plan { get; set; }
|
|
public PlanType PlanType { get; set; }
|
|
public short? Seats { get; set; }
|
|
public short? MaxSubvaults { get; set; }
|
|
public string StripeCustomerId { get; set; }
|
|
public string StripeSubscriptionId { get; set; }
|
|
public bool Enabled { get; set; } = true;
|
|
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
|
|
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
|
|
|
|
public void SetNewId()
|
|
{
|
|
if(Id == default(Guid))
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|
|
}
|
|
}
|