Skip to content

Commit ec38247

Browse files
committed
WIP
1 parent f799d48 commit ec38247

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ $image = $connector->send(new GetDocumentPreviewRequest($fileCabinetId, $documen
461461
#### Create Data Record
462462
```php
463463
use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord;
464+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO;
464465

465466
$document = $connector->send(new CreateDataRecord(
466467
$fileCabinetId,
@@ -472,9 +473,48 @@ $document = $connector->send(new CreateDataRecord(
472473
))->dto();
473474
```
474475

476+
#### Create Table Data Record
477+
```php
478+
use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord;
479+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO;
480+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO;
481+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO;
482+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO;
483+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTableDTO;
484+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO;
485+
486+
$tableRows = collect([
487+
collect([
488+
IndexTextDTO::make('TEXT', 'project_1'),
489+
IndexNumericDTO::make('INT', 1),
490+
IndexDecimalDTO::make('DECIMAL', 1.1),
491+
IndexDateDTO::make('DATE', $now),
492+
IndexDateTimeDTO::make('DATETIME', $now),
493+
]),
494+
collect([
495+
IndexTextDTO::make('TEXT', 'project_2'),
496+
IndexNumericDTO::make('INT', 2),
497+
IndexDecimalDTO::make('DECIMAL', 2.2),
498+
IndexDateDTO::make('DATE', $now),
499+
IndexDateTimeDTO::make('DATETIME', $now),
500+
]),
501+
]);
502+
503+
504+
$document = $connector->send(new CreateDataRecord(
505+
$fileCabinetId,
506+
null,
507+
null,
508+
collect([
509+
IndexTableDTO::make('TABLE_NAME', $tableRows)
510+
]),
511+
))->dto();
512+
```
513+
475514
#### Update Index Values
476515
```php
477516
use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues;
517+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO;
478518

479519
$response = $connector->send(new UpdateIndexValues(
480520
$fileCabinetId,
@@ -484,6 +524,44 @@ $response = $connector->send(new UpdateIndexValues(
484524
])
485525
))->dto();
486526
```
527+
528+
#### Update Table Data Record
529+
```php
530+
use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues;
531+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO;
532+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateTimeDTO;
533+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDecimalDTO;
534+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexNumericDTO;
535+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTableDTO;
536+
use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO;
537+
538+
$tableRows = collect([
539+
collect([
540+
IndexTextDTO::make('TEXT', 'project_1'),
541+
IndexNumericDTO::make('INT', 1),
542+
IndexDecimalDTO::make('DECIMAL', 1.1),
543+
IndexDateDTO::make('DATE', $now),
544+
IndexDateTimeDTO::make('DATETIME', $now),
545+
]),
546+
collect([
547+
IndexTextDTO::make('TEXT', 'project_2'),
548+
IndexNumericDTO::make('INT', 2),
549+
IndexDecimalDTO::make('DECIMAL', 2.2),
550+
IndexDateDTO::make('DATE', $now),
551+
IndexDateTimeDTO::make('DATETIME', $now),
552+
]),
553+
]);
554+
555+
556+
$document = $connector->send(new UpdateIndexValues(
557+
$fileCabinetId,
558+
null,
559+
null,
560+
collect([
561+
IndexTableDTO::make('TABLE_NAME', $tableRows)
562+
]),
563+
))->dto();
564+
```
487565
</details>
488566

489567

0 commit comments

Comments
 (0)