'required|integer', 'user_id' => 'required|integer', 'role' => 'required|in_list[admin,editor,viewer]', ]; protected $validationMessages = []; protected $skipValidation = false; protected $cleanValidationRules = true; // Callbacks protected $allowCallbacks = true; protected $beforeInsert = []; protected $afterInsert = []; protected $beforeUpdate = []; protected $afterUpdate = []; protected $beforeFind = []; protected $afterFind = []; protected $beforeDelete = []; protected $afterDelete = []; public function getByWorkspace(int $workspaceId): array { return $this->select('workspace_members.*, users.name, users.email') ->join('users', 'users.id = workspace_members.user_id') ->where('workspace_members.workspace_id', $workspaceId) ->orderBy('workspace_members.created_at', 'ASC') ->findAll(); } }