This commit includes all previously untracked backend files: Domain: - Accounts, Attachments, BankConnections, Customers - FiscalYears, Invoices, JournalEntryDrafts - Orders, Products, UserAccess Commands & Handlers: - Full CQRS command structure for all domains Repositories: - PostgreSQL repositories for all read models - Bank transaction and ledger repositories GraphQL: - Input types, scalars, and types for all entities - Mutations and queries Infrastructure: - Banking integration (Enable Banking client) - File storage, Invoicing, Reporting, SAF-T export - Database migrations (003-029) Tests: - Integration tests for GraphQL endpoints - Domain tests - Invoicing and reporting tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
using Books.Api.Domain.Products;
|
|
using EventFlow.Commands;
|
|
|
|
namespace Books.Api.Commands.Products;
|
|
|
|
public class CreateProductCommand(
|
|
ProductId aggregateId,
|
|
string companyId,
|
|
string? productNumber,
|
|
string name,
|
|
string? description,
|
|
decimal unitPrice,
|
|
string vatCode,
|
|
string? unit,
|
|
string? defaultAccountId,
|
|
string? ean,
|
|
string? manufacturer)
|
|
: Command<ProductAggregate, ProductId>(aggregateId)
|
|
{
|
|
public string CompanyId { get; } = companyId;
|
|
public string? ProductNumber { get; } = productNumber;
|
|
public string Name { get; } = name;
|
|
public string? Description { get; } = description;
|
|
public decimal UnitPrice { get; } = unitPrice;
|
|
public string VatCode { get; } = vatCode;
|
|
public string? Unit { get; } = unit;
|
|
public string? DefaultAccountId { get; } = defaultAccountId;
|
|
public string? Ean { get; } = ean;
|
|
public string? Manufacturer { get; } = manufacturer;
|
|
}
|
|
|
|
public class UpdateProductCommand(
|
|
ProductId aggregateId,
|
|
string? productNumber,
|
|
string name,
|
|
string? description,
|
|
decimal unitPrice,
|
|
string vatCode,
|
|
string? unit,
|
|
string? defaultAccountId,
|
|
string? ean,
|
|
string? manufacturer)
|
|
: Command<ProductAggregate, ProductId>(aggregateId)
|
|
{
|
|
public string? ProductNumber { get; } = productNumber;
|
|
public string Name { get; } = name;
|
|
public string? Description { get; } = description;
|
|
public decimal UnitPrice { get; } = unitPrice;
|
|
public string VatCode { get; } = vatCode;
|
|
public string? Unit { get; } = unit;
|
|
public string? DefaultAccountId { get; } = defaultAccountId;
|
|
public string? Ean { get; } = ean;
|
|
public string? Manufacturer { get; } = manufacturer;
|
|
}
|
|
|
|
public class DeactivateProductCommand(ProductId aggregateId)
|
|
: Command<ProductAggregate, ProductId>(aggregateId);
|
|
|
|
public class ReactivateProductCommand(ProductId aggregateId)
|
|
: Command<ProductAggregate, ProductId>(aggregateId);
|