id = (int) ($row['id'] ?? 0); $model->boardId = (int) ($row['board_id'] ?? 0); $model->columnId = (int) ($row['column_id'] ?? 0); $model->swimLaneId = (int) ($row['swim_lane_id'] ?? 0); $model->jobNumber = (string) ($row['job_number'] ?? ''); $model->jobName = (string) ($row['job_name'] ?? ''); $model->customerName = (string) ($row['customer_name'] ?? ''); $model->deliveryDate = $row['delivery_date'] ?: null; $model->quantity = (string) ($row['quantity'] ?? ''); $model->notes = (string) ($row['notes'] ?? ''); $model->fullNote = (string) ($row['full_note'] ?? ''); $model->position = (int) ($row['position'] ?? 0); $model->cellEnteredAt = $row['cell_entered_at'] ?? null; $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; } public function toJsonArray(): array { return [ 'id' => $this->id, 'column_id' => $this->columnId, 'swim_lane_id' => $this->swimLaneId, 'job_number' => $this->jobNumber, 'job_name' => $this->jobName, 'customer_name' => $this->customerName, 'delivery_date' => $this->deliveryDate, 'quantity' => $this->quantity, 'notes' => $this->notes, 'full_note' => $this->fullNote, 'position' => $this->position, 'cell_entered_at' => $this->cellEnteredAt, ]; } }