feat: Add Laravel tinker examples and update nominal accounts functionality

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-01-24 23:40:20 +03:00
parent 0e66eb2859
commit fdb400d5f0
24 changed files with 571 additions and 111 deletions

View File

@@ -14,22 +14,25 @@ namespace Apoloz\AlfaBank\Data\NominalAccounts\Deals\Steps;
// <SECTION name="module_imports" intent="Import necessary DTOs and Spatie Laravel Data components.">
// <BELIEF_STATE "This DTO requires `DigestSignatureData` as a collection for security, utilizing `DataCollectionOf` for type safety.">
use Apoloz\AlfaBank\Data\NominalAccounts\Payouts\DigestSignatureData;
use Apoloz\AlfaBank\Traits\SignableData;
use Spatie\LaravelData\Attributes\DataCollectionOf;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\DataCollection;
// </SECTION>
// <SECTION name="class_definition" intent="Define a DTO for performing an action on a deal step.">
// <BELIEF_STATE "This DTO provides a robust contract for managing the lifecycle of deal steps. It ensures that critical operational and security data is strictly typed and correctly structured for actions like completion or cancellation.">
// <BELIEF_STATE "This DTO encapsulates the data required to transition a deal step to a new state (e.g., COMPLETE, CANCEL). It handles the action type, identifiers, and necessary signatures.">
class StepActionRequestData extends Data
{
// <SECTION name="constructor_properties" intent="Define all properties for the step action request.">
use SignableData;
// <SECTION name="constructor_properties" intent="Define the properties of the step action request.">
// <BELIEF_STATE "The constructor includes mandatory fields like `dealId`, `action` (e.g., 'COMPLETE', 'CANCEL'), and `digestSignatures`. Optional fields like `stepId` (if targeting a specific step within the deal) and `description` provide flexibility and context for the action.">
public function __construct(
public string $dealId,
public string $action, // e.g., COMPLETE, CANCEL
public string $action,
#[DataCollectionOf(DigestSignatureData::class)]
public DataCollection $digestSignatures,
public ?DataCollection $digestSignatures = null,
public ?string $stepId = null,
public ?string $description = null,
) {}