books/backend/Books.Api/EventFlow/ReadModels/CompanyReadModelDto.cs

33 lines
1.2 KiB
C#
Raw Normal View History

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; }
// Bank details for invoicing
public string? BankName { get; set; }
public string? BankRegNo { get; set; }
public string? BankAccountNo { get; set; }
public string? BankIban { get; set; }
public string? BankBic { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}