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.
|
- <?php
-
- declare(strict_types=1);
-
- namespace App\Models;
-
- class BoardColumn
- {
- public int $id = 0;
- public int $boardId = 0;
- public string $name = '';
- public int $position = 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->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;
- }
- }
|