1
0
mirror of https://github.com/bitwarden/server synced 2025-12-22 03:03:33 +00:00

[PM-21099] (NO LOGIC) Organize Billing provider code (#5819)

* [NO LOGIC] Organize Billing provider code

* Run dotnet format

* Run dotnet format'

* Fixed using after merge

* Fixed test usings after merge
This commit is contained in:
Alex Morask
2025-05-21 09:04:30 -04:00
committed by GitHub
parent e994bf2117
commit 18d146406c
74 changed files with 143 additions and 134 deletions

View File

@@ -0,0 +1,34 @@
#nullable enable
using System.ComponentModel.DataAnnotations;
using Bit.Core.Entities;
using Bit.Core.Utilities;
namespace Bit.Core.Billing.Providers.Entities;
public class ProviderInvoiceItem : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid ProviderId { get; set; }
[MaxLength(50)]
public string InvoiceId { get; set; } = null!;
[MaxLength(50)]
public string? InvoiceNumber { get; set; }
public Guid? ClientId { get; set; }
[MaxLength(50)]
public string ClientName { get; set; } = null!;
[MaxLength(50)]
public string PlanName { get; set; } = null!;
public int AssignedSeats { get; set; }
public int UsedSeats { get; set; }
public decimal Total { get; set; }
public DateTime Created { get; set; } = DateTime.UtcNow;
public void SetNewId()
{
if (Id == default)
{
Id = CoreHelpers.GenerateComb();
}
}
}