using Books.Api.Domain.Invoices;
using EventFlow.Aggregates;

namespace Books.Api.Domain.Invoices.Events;

/// <summary>
/// Raised when a line is added to an invoice draft.
/// </summary>
public class InvoiceLineAddedEvent(
    int lineNumber,
    string description,
    decimal quantity,
    string? unit,
    decimal unitPrice,
    decimal discountPercent,
    string vatCode,
    string? accountId) : AggregateEvent<InvoiceAggregate, InvoiceId>
{
    public int LineNumber { get; } = lineNumber;
    public string Description { get; } = description;
    public decimal Quantity { get; } = quantity;
    public string? Unit { get; } = unit;
    public decimal UnitPrice { get; } = unitPrice;
    public decimal DiscountPercent { get; } = discountPercent;
    public string VatCode { get; } = vatCode;
    public string? AccountId { get; } = accountId;
}
