1
0
mirror of https://github.com/bitwarden/server synced 2026-01-01 08:03:23 +00:00

[AC-1943] Add ProviderInvoiceItem table (#4163)

* Add ProviderInvoiceItem table

* Run dotnet format
This commit is contained in:
Alex Morask
2024-06-06 13:25:13 -04:00
committed by GitHub
parent fef34d845f
commit 725fc2eed3
28 changed files with 8765 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using Bit.Core.Entities;
using Bit.Core.Utilities;
namespace Bit.Core.Billing.Entities;
public class ProviderInvoiceItem : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid ProviderId { get; set; }
public string InvoiceId { get; set; }
public string InvoiceNumber { get; set; }
public string ClientName { get; set; }
public string PlanName { get; set; }
public int AssignedSeats { get; set; }
public int UsedSeats { get; set; }
public decimal Total { get; set; }
public DateTime Created { get; set; }
public void SetNewId()
{
if (Id == default)
{
Id = CoreHelpers.GenerateComb();
}
}
}

View File

@@ -0,0 +1,10 @@
using Bit.Core.Billing.Entities;
using Bit.Core.Repositories;
namespace Bit.Core.Billing.Repositories;
public interface IProviderInvoiceItemRepository : IRepository<ProviderInvoiceItem, Guid>
{
Task<ProviderInvoiceItem> GetByInvoiceId(string invoiceId);
Task<ICollection<ProviderInvoiceItem>> GetByProviderId(Guid providerId);
}