- Add decodeHtmlEntities function to formatters.ts for handling HTML entity decoding - Add CompanyRole type and role helper functions (getRoleLabel, getRoleColor) - Add useActiveCompanyRole hook for getting current user's company role - Add Ledger.Core and QuestPDF project references to backend - Add additional fields to CompanyReadModelDto Closes books-hzt Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
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; }
|
|
|
|
// 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; }
|
|
}
|