using GraphQL.Types;

namespace Books.Api.GraphQL.InputTypes;

public class UpdateAccountInputType : InputObjectGraphType<UpdateAccountInput>
{
    public UpdateAccountInputType()
    {
        Name = "UpdateAccountInput";
        Description = "Input for updating an existing account";

        Field(x => x.Name).Description("Account name (required)");
        Field(x => x.ParentId, nullable: true).Description("Parent account ID for hierarchy");
        Field(x => x.Description, nullable: true).Description("Account description");
        Field(x => x.VatCodeId, nullable: true).Description("Default VAT code ID");
    }
}

public class UpdateAccountInput
{
    public string Name { get; set; } = string.Empty;
    public string? ParentId { get; set; }
    public string? Description { get; set; }
    public string? VatCodeId { get; set; }
}
