using Books.Api.Domain.Products;
using EventFlow.Commands;

namespace Books.Api.Commands.Products;

public class CreateProductCommand(
    ProductId aggregateId,
    string companyId,
    string? productNumber,
    string name,
    string? description,
    decimal unitPrice,
    string vatCode,
    string? unit,
    string? defaultAccountId,
    string? ean,
    string? manufacturer)
    : Command<ProductAggregate, ProductId>(aggregateId)
{
    public string CompanyId { get; } = companyId;
    public string? ProductNumber { get; } = productNumber;
    public string Name { get; } = name;
    public string? Description { get; } = description;
    public decimal UnitPrice { get; } = unitPrice;
    public string VatCode { get; } = vatCode;
    public string? Unit { get; } = unit;
    public string? DefaultAccountId { get; } = defaultAccountId;
    public string? Ean { get; } = ean;
    public string? Manufacturer { get; } = manufacturer;
}

public class UpdateProductCommand(
    ProductId aggregateId,
    string? productNumber,
    string name,
    string? description,
    decimal unitPrice,
    string vatCode,
    string? unit,
    string? defaultAccountId,
    string? ean,
    string? manufacturer)
    : Command<ProductAggregate, ProductId>(aggregateId)
{
    public string? ProductNumber { get; } = productNumber;
    public string Name { get; } = name;
    public string? Description { get; } = description;
    public decimal UnitPrice { get; } = unitPrice;
    public string VatCode { get; } = vatCode;
    public string? Unit { get; } = unit;
    public string? DefaultAccountId { get; } = defaultAccountId;
    public string? Ean { get; } = ean;
    public string? Manufacturer { get; } = manufacturer;
}

public class DeactivateProductCommand(ProductId aggregateId)
    : Command<ProductAggregate, ProductId>(aggregateId);

public class ReactivateProductCommand(ProductId aggregateId)
    : Command<ProductAggregate, ProductId>(aggregateId);
