Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
|
- <?php
-
- declare(strict_types=1);
-
- namespace App\Models;
-
- class SwimLane
- {
- public int $id = 0;
- public int $boardId = 0;
- public string $name = '';
- public int $position = 0;
- public bool $showCardCount = false;
- public bool $showExportButton = false;
- public bool $showCardAge = false;
- public int $cardAgeWarningDays = 0;
- public ?string $createdAt = null;
- public string $createdBy = '';
- public ?string $updatedAt = null;
- public string $updatedBy = '';
-
- public static function fromRow(array $row): self
- {
- $model = new self();
- $model->id = (int) ($row['id'] ?? 0);
- $model->boardId = (int) ($row['board_id'] ?? 0);
- $model->name = (string) ($row['name'] ?? '');
- $model->position = (int) ($row['position'] ?? 0);
- $model->showCardCount = (bool) ($row['show_card_count'] ?? false);
- $model->showExportButton = (bool) ($row['show_export_button'] ?? false);
- $model->showCardAge = (bool) ($row['show_card_age'] ?? false);
- $model->cardAgeWarningDays = (int) ($row['card_age_warning_days'] ?? 0);
- $model->createdAt = $row['created_at'] ?? null;
- $model->createdBy = (string) ($row['created_by'] ?? '');
- $model->updatedAt = $row['updated_at'] ?? null;
- $model->updatedBy = (string) ($row['updated_by'] ?? '');
-
- return $model;
- }
- }
|