You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
925B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Models;
  4. class SwimLane
  5. {
  6. public int $id = 0;
  7. public int $boardId = 0;
  8. public string $name = '';
  9. public int $position = 0;
  10. public ?string $createdAt = null;
  11. public string $createdBy = '';
  12. public ?string $updatedAt = null;
  13. public string $updatedBy = '';
  14. public static function fromRow(array $row): self
  15. {
  16. $model = new self();
  17. $model->id = (int) ($row['id'] ?? 0);
  18. $model->boardId = (int) ($row['board_id'] ?? 0);
  19. $model->name = (string) ($row['name'] ?? '');
  20. $model->position = (int) ($row['position'] ?? 0);
  21. $model->createdAt = $row['created_at'] ?? null;
  22. $model->createdBy = (string) ($row['created_by'] ?? '');
  23. $model->updatedAt = $row['updated_at'] ?? null;
  24. $model->updatedBy = (string) ($row['updated_by'] ?? '');
  25. return $model;
  26. }
  27. }

Powered by TurnKey Linux.