*/ public function rules(): array { return [ 'rowId' => ['required', 'string', 'uuid'], 'qty' => ['sometimes', 'integer', 'gt:0'], ]; } public function getProductId(): ProductId { return new ProductId( Uuid::fromString( $this->string('rowId')->value() ) ); } }