ModelData.php 799 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. namespace Hyperf\Database\Commands;
  12. class ModelData
  13. {
  14. public function __construct(protected string $class, protected array $columns)
  15. {
  16. }
  17. public function getColumns(): array
  18. {
  19. return $this->columns;
  20. }
  21. public function setColumns(array $columns): static
  22. {
  23. $this->columns = $columns;
  24. return $this;
  25. }
  26. public function getClass(): string
  27. {
  28. return $this->class;
  29. }
  30. public function setClass(string $class): static
  31. {
  32. $this->class = $class;
  33. return $this;
  34. }
  35. }