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;
}
