Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

41 строка
1.4KB

  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 bool $showCardCount = false;
  11. public bool $showExportButton = false;
  12. public bool $showCardAge = false;
  13. public int $cardAgeWarningDays = 0;
  14. public ?string $createdAt = null;
  15. public string $createdBy = '';
  16. public ?string $updatedAt = null;
  17. public string $updatedBy = '';
  18. public static function fromRow(array $row): self
  19. {
  20. $model = new self();
  21. $model->id = (int) ($row['id'] ?? 0);
  22. $model->boardId = (int) ($row['board_id'] ?? 0);
  23. $model->name = (string) ($row['name'] ?? '');
  24. $model->position = (int) ($row['position'] ?? 0);
  25. $model->showCardCount = (bool) ($row['show_card_count'] ?? false);
  26. $model->showExportButton = (bool) ($row['show_export_button'] ?? false);
  27. $model->showCardAge = (bool) ($row['show_card_age'] ?? false);
  28. $model->cardAgeWarningDays = (int) ($row['card_age_warning_days'] ?? 0);
  29. $model->createdAt = $row['created_at'] ?? null;
  30. $model->createdBy = (string) ($row['created_by'] ?? '');
  31. $model->updatedAt = $row['updated_at'] ?? null;
  32. $model->updatedBy = (string) ($row['updated_by'] ?? '');
  33. return $model;
  34. }
  35. }

Powered by TurnKey Linux.