@@ -461,6 +461,7 @@ $image = $connector->send(new GetDocumentPreviewRequest($fileCabinetId, $documen
461
461
#### Create Data Record
462
462
``` php
463
463
use CodebarAg\DocuWare\Requests\FileCabinets\Upload\CreateDataRecord;
464
+ use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexTextDTO;
464
465
465
466
$document = $connector->send(new CreateDataRecord(
466
467
$fileCabinetId,
@@ -472,9 +473,48 @@ $document = $connector->send(new CreateDataRecord(
472
473
))->dto();
473
474
```
474
475
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
+
475
514
#### Update Index Values
476
515
``` php
477
516
use CodebarAg\DocuWare\Requests\Documents\UpdateIndexValues\UpdateIndexValues;
517
+ use CodebarAg\DocuWare\DTO\Documents\DocumentIndex\IndexDateDTO;
478
518
479
519
$response = $connector->send(new UpdateIndexValues(
480
520
$fileCabinetId,
@@ -484,6 +524,44 @@ $response = $connector->send(new UpdateIndexValues(
484
524
])
485
525
))->dto();
486
526
```
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
+ ```
487
565
</details >
488
566
489
567
0 commit comments