get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}erp_hr_designations WHERE id = %d", $designation_id ) ); } /** * Get number of employee belongs to this department * * @return int */ public function num_of_employees() { return \WeDevs\ERP\HRM\Models\Employee::where( array( 'status' => 'active', 'designation' => $this->id ) )->count(); } }