mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 19:14:32 -05:00

* Add endpoint to update a provider organization's seats for consolidated billing. * Fixed failing tests
26 lines
658 B
C#
26 lines
658 B
C#
using Bit.Core.Entities;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.Billing.Entities;
|
|
|
|
public class ProviderPlan : ITableObject<Guid>
|
|
{
|
|
public Guid Id { get; set; }
|
|
public Guid ProviderId { get; set; }
|
|
public PlanType PlanType { get; set; }
|
|
public int? SeatMinimum { get; set; }
|
|
public int? PurchasedSeats { get; set; }
|
|
public int? AllocatedSeats { get; set; }
|
|
|
|
public void SetNewId()
|
|
{
|
|
if (Id == default)
|
|
{
|
|
Id = CoreHelpers.GenerateComb();
|
|
}
|
|
}
|
|
|
|
public bool IsConfigured() => SeatMinimum.HasValue && PurchasedSeats.HasValue && AllocatedSeats.HasValue;
|
|
}
|