books/backend/Books.Api/EventFlow/ReadModels/CompanyReadModelDto.cs
Nicolaj Hartmann 66f6fa138d Initial commit: Books accounting system with EventFlow CQRS
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>
2026-01-18 02:52:30 +01:00

24 lines
995 B
C#

namespace Books.Api.EventFlow.ReadModels;
/// <summary>
/// DTO for reading company data from the database.
/// Uses a class with properties instead of a positional record because
/// PostgreSQL returns column names in lowercase, and Dapper matches
/// properties case-insensitively but requires exact constructor parameter names.
/// </summary>
public class CompanyReadModelDto
{
public string Id { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string? Cvr { get; set; }
public string? Address { get; set; }
public string? PostalCode { get; set; }
public string? City { get; set; }
public string Country { get; set; } = string.Empty;
public int FiscalYearStartMonth { get; set; }
public string Currency { get; set; } = string.Empty;
public bool VatRegistered { get; set; }
public string? VatPeriodFrequency { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}