$row */ public static function fromMappedRow(array $row): self { return new self( employeeNumber: (string) ($row['employee_number'] ?? ''), fullName: (string) ($row['full_name'] ?? ''), nationalId: self::nullableString($row['national_id'] ?? null), gender: self::nullableString($row['gender'] ?? null), birthDate: self::nullableString($row['birth_date'] ?? null), phone: self::nullableString($row['phone'] ?? null), address: self::nullableString($row['address'] ?? null), department: self::nullableString($row['department'] ?? null), position: self::nullableString($row['position'] ?? null), shift: self::nullableString($row['shift'] ?? null), employmentStatus: self::nullableString($row['employment_status'] ?? null), hireDate: self::nullableString($row['hire_date'] ?? null), notes: self::nullableString($row['notes'] ?? null), ); } private static function nullableString(mixed $value): ?string { if ($value === null || $value === '') { return null; } return (string) $value; } }