'hp_drafted', 'type' => 'integer', 'searchable' => true, 'label' => 'Drafted flag (0/1)', ), ), array( 'post_types' => array( 'hp_listing', 'hp_request' ) ) ); } /** * HivePress Bookings (post_type=hp_booking): slot-availability lookups. * * @return void */ private static function register_hp_booking_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_booking_core', array( array( 'key' => 'hp_start_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Booking start unix ts', ), array( 'key' => 'hp_end_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Booking end unix ts', ), array( 'key' => 'hp_quantity', 'type' => 'integer', 'label' => 'Places booked', ), ), array( 'post_types' => array( 'hp_booking' ) ) ); } /** * HivePress Memberships plan (post_type=hp_membership_plan). * * @return void */ private static function register_hp_membership_plan_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_membership_plan_core', array( array( 'key' => 'hp_expire_period', 'type' => 'integer', 'label' => 'Plan expiry period (days)', ), array( 'key' => 'hp_primary', 'type' => 'integer', 'searchable' => true, 'label' => 'Primary plan flag (0/1)', ), ), array( 'post_types' => array( 'hp_membership_plan' ) ) ); } /** * HivePress Memberships subscription (post_type=hp_membership). * * @return void */ private static function register_hp_membership_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_membership_core', array( array( 'key' => 'hp_expired_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Expiry unix ts', ), ), array( 'post_types' => array( 'hp_membership' ) ) ); } /** * HivePress listing core meta keys (post_type=hp_listing). * Aligns with the existing wpdo_hot_hp_listing flat table; v2.9.5 will * copy-then-cutover the 230 dev10 rows to this group's table. * * @return void */ private static function register_hp_listing_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_listing_core', array( array( 'key' => 'hp_price', 'type' => 'decimal', 'searchable' => true, 'label' => 'Listing price', ), array( 'key' => 'hp_status', 'type' => 'enum', 'searchable' => true, 'options' => array( 'publish', 'draft', 'pending', 'expired', 'private' ), 'label' => 'Listing status', ), array( 'key' => 'hp_featured', 'type' => 'integer', 'searchable' => true, 'label' => 'Featured flag (0/1)', ), array( 'key' => 'hp_verified', 'type' => 'integer', 'searchable' => true, 'label' => 'Verified flag (0/1)', ), array( 'key' => 'hp_vendor', 'type' => 'integer', 'searchable' => true, 'label' => 'Vendor user ID', ), array( 'key' => 'hp_expired_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Expiry unix ts', ), array( 'key' => 'hp_featured_time', 'type' => 'integer', 'label' => 'Featured-until unix ts', ), array( 'key' => 'hp_view_count', 'type' => 'integer', 'searchable' => true, 'label' => 'View counter', ), array( 'key' => 'hp_rating', 'type' => 'decimal', 'searchable' => true, 'label' => 'Average rating', ), array( 'key' => 'hp_rating_count', 'type' => 'integer', 'label' => 'Rating count', ), array( 'key' => 'hp_hourly_rate', 'type' => 'decimal', 'label' => 'Hourly rate', ), ), array( 'post_types' => array( 'hp_listing' ) ) ); } /** * HivePress request core meta keys (post_type=hp_request). * * @return void */ private static function register_hp_request_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_request_core', array( array( 'key' => 'hp_status', 'type' => 'enum', 'searchable' => true, 'options' => array( 'publish', 'draft', 'pending', 'expired' ), 'label' => 'Request status', ), array( 'key' => 'hp_user', 'type' => 'integer', 'searchable' => true, 'label' => 'Request author user ID', ), array( 'key' => 'hp_expired_time', 'type' => 'integer', 'searchable' => true, 'label' => 'Expiry unix ts', ), array( 'key' => 'hp_budget', 'type' => 'decimal', 'searchable' => true, 'label' => 'Budget amount', ), array( 'key' => 'hp_view_count', 'type' => 'integer', 'label' => 'View counter', ), ), array( 'post_types' => array( 'hp_request' ) ) ); } /** * HivePress vendor core meta keys (post_type=hp_vendor). * * @return void */ private static function register_hp_vendor_core_group(): void { TMDO_Entity_Registry::register_group( 'post', 'hp_vendor_core', array( array( 'key' => 'hp_user', 'type' => 'integer', 'searchable' => true, 'label' => 'Vendor user ID (linked WP user)', ), array( 'key' => 'hp_verified', 'type' => 'integer', 'searchable' => true, 'label' => 'Verified flag (0/1)', ), array( 'key' => 'hp_hourly_rate', 'type' => 'decimal', 'searchable' => true, 'label' => 'Hourly rate', ), array( 'key' => 'hp_rating_count', 'type' => 'integer', 'label' => 'Rating count', ), array( 'key' => 'hp_rating', 'type' => 'decimal', 'searchable' => true, 'label' => 'Average rating', ), ), array( 'post_types' => array( 'hp_vendor' ) ) ); } /** * HivePress per-user fields (favorites + avatar attachment). * * Hp_favorited_listings is a serialized array of post IDs in legacy storage; * the migration engine safe_unserialize()s it (allowed_classes=false to block * PHP-object injection) then the json type encodes back to a JSON array column. * * @return void */ private static function register_hp_user_group(): void { TMDO_Entity_Registry::register_group( 'user', 'hp_user', array( array( 'key' => 'hp_favorited_listings', 'type' => 'json', 'label' => 'HivePress favorited listing IDs (array)', ), array( 'key' => 'hp_image', 'type' => 'text', 'label' => 'HivePress avatar attachment ID', ), ) ); } }