Backend (.NET 10): - EventFlow CQRS/Event Sourcing with PostgreSQL - GraphQL.NET API with mutations and queries - Custom ReadModelSqlGenerator for snake_case PostgreSQL columns - Hangfire for background job processing - Integration tests with isolated test databases Frontend (React/Vite): - Initial project structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
using Books.Api.Domain.Companies;
|
|
using EventFlow.Commands;
|
|
|
|
namespace Books.Api.Commands.Companies;
|
|
|
|
public class CreateCompanyCommand(
|
|
CompanyId aggregateId,
|
|
string name,
|
|
string? cvr,
|
|
string? address,
|
|
string? postalCode,
|
|
string? city,
|
|
string country,
|
|
int fiscalYearStartMonth,
|
|
string currency,
|
|
bool vatRegistered,
|
|
string? vatPeriodFrequency)
|
|
: Command<CompanyAggregate, CompanyId>(aggregateId)
|
|
{
|
|
public string Name { get; } = name;
|
|
public string? Cvr { get; } = cvr;
|
|
public string? Address { get; } = address;
|
|
public string? PostalCode { get; } = postalCode;
|
|
public string? City { get; } = city;
|
|
public string Country { get; } = country;
|
|
public int FiscalYearStartMonth { get; } = fiscalYearStartMonth;
|
|
public string Currency { get; } = currency;
|
|
public bool VatRegistered { get; } = vatRegistered;
|
|
public string? VatPeriodFrequency { get; } = vatPeriodFrequency;
|
|
}
|
|
|
|
public class UpdateCompanyCommand(
|
|
CompanyId aggregateId,
|
|
string name,
|
|
string? cvr,
|
|
string? address,
|
|
string? postalCode,
|
|
string? city,
|
|
string country,
|
|
int fiscalYearStartMonth,
|
|
string currency,
|
|
bool vatRegistered,
|
|
string? vatPeriodFrequency)
|
|
: Command<CompanyAggregate, CompanyId>(aggregateId)
|
|
{
|
|
public string Name { get; } = name;
|
|
public string? Cvr { get; } = cvr;
|
|
public string? Address { get; } = address;
|
|
public string? PostalCode { get; } = postalCode;
|
|
public string? City { get; } = city;
|
|
public string Country { get; } = country;
|
|
public int FiscalYearStartMonth { get; } = fiscalYearStartMonth;
|
|
public string Currency { get; } = currency;
|
|
public bool VatRegistered { get; } = vatRegistered;
|
|
public string? VatPeriodFrequency { get; } = vatPeriodFrequency;
|
|
}
|