{"table_name":"arshid6social_listings","full_table_name":"wp_arshid6social_listings","description":"Stores arshid6social listings data created by this plugin.","detection_method":"static","confidence":"high","create_sql":"CREATE TABLE wp_arshid6social_listings ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, uid varchar(12) NOT NULL DEFAULT '', seller_id bigint(20) unsigned NOT NULL, title varchar(200) NOT NULL DEFAULT '', description longtext NOT NULL, price DECIMAL(15,4) NOT NULL DEFAULT '0.0000', currency varchar(10) NOT NULL DEFAULT '', item_condition varchar(20) NOT NULL DEFAULT 'used', category_id bigint(20) unsigned NOT NULL DEFAULT 0, location_city varchar(100) NOT NULL DEFAULT '', location_country varchar(10) NOT NULL DEFAULT '', lat DECIMAL(10,7) DEFAULT NULL, lng DECIMAL(10,7) DEFAULT NULL, status varchar(20) NOT NULL DEFAULT 'draft', is_negotiable tinyint(1) NOT NULL DEFAULT 0, is_free tinyint(1) NOT NULL DEFAULT 0, views bigint(20) unsigned NOT NULL DEFAULT 0, created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00', updated_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00', expires_at datetime DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY uid (uid), KEY status_category (status, category_id), KEY seller_id (seller_id), KEY lat_lng (lat, lng), KEY expires_at (expires_at), KEY status (status), KEY created_at (created_at) ) $charset_collate;\"; // ── Listing media ───────────────────────────────────────────────────── // attachment_id links to WP Media Library; file_url/file_path are the // actual stored file so listings survive media library purges. $tables[] = \"CREATE TABLE wp_arshid6social_listing_media ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, listing_id bigint(20) unsigned NOT NULL, attachment_id bigint(20) unsigned NOT NULL DEFAULT 0, file_url varchar(2083) NOT NULL DEFAULT '', file_path varchar(500) NOT NULL DEFAULT '', is_primary tinyint(1) NOT NULL DEFAULT 0, sort_order int(11) NOT NULL DEFAULT 0, PRIMARY KEY (id), KEY listing_id (listing_id), KEY is_primary (is_primary) ) $charset_collate;\"; // ── Categories ──────────────────────────────────────────────────────── $tables[] = \"CREATE TABLE wp_arshid6social_categories ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, parent_id bigint(20) unsigned NOT NULL DEFAULT 0, name varchar(150) NOT NULL DEFAULT '', slug varchar(150) NOT NULL DEFAULT '', icon varchar(100) NOT NULL DEFAULT '', sort_order int(11) NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE KEY slug (slug), KEY parent_id (parent_id) ) $charset_collate;\"; // ── Favorites ───────────────────────────────────────────────────────── $tables[] = \"CREATE TABLE wp_arshid6social_favorites ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, user_id bigint(20) unsigned NOT NULL, listing_id bigint(20) unsigned NOT NULL, created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY user_listing (user_id, listing_id), KEY user_id (user_id), KEY listing_id (listing_id) ) $charset_collate;\"; // ── Reviews ─────────────────────────────────────────────────────────── // One review per buyer per listing; moderated before display. $tables[] = \"CREATE TABLE wp_arshid6social_reviews ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, listing_id bigint(20) unsigned NOT NULL, seller_id bigint(20) unsigned NOT NULL, buyer_id bigint(20) unsigned NOT NULL, rating tinyint(1) NOT NULL DEFAULT 5, comment text NOT NULL, status varchar(20) NOT NULL DEFAULT 'pending', created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY listing_buyer (listing_id, buyer_id), KEY seller_id (seller_id), KEY buyer_id (buyer_id), KEY status (status) ) $charset_collate;\"; // ── Offers ──────────────────────────────────────────────────────────── // Optional haggling record; money never flows through the plugin. // message_thread_id links to {prefix}arshid6social_messages_threads for context. $tables[] = \"CREATE TABLE wp_arshid6social_offers ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, listing_id bigint(20) unsigned NOT NULL, buyer_id bigint(20) unsigned NOT NULL, amount DECIMAL(15,4) NOT NULL DEFAULT '0.0000', status varchar(20) NOT NULL DEFAULT 'pending', message_thread_id bigint(20) unsigned DEFAULT NULL, note text, created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (id), KEY listing_id (listing_id), KEY buyer_id (buyer_id), KEY status (status) ) $charset_collate;\"; // ── Saved searches ──────────────────────────────────────────────────── // query_json stores the serialised filter state for re-running searches // and for the cron alert job to match new listings against. $tables[] = \"CREATE TABLE wp_arshid6social_saved_searches ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, user_id bigint(20) unsigned NOT NULL, label varchar(100) NOT NULL DEFAULT '', query_json longtext NOT NULL, notify tinyint(1) NOT NULL DEFAULT 0, last_notified datetime DEFAULT NULL, created_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (id), KEY user_id (user_id), KEY notify (notify) ) $charset_collate;\"; foreach ( $tables as $sql ) { dbDelta( $sql );","columns":[{"name":"id","type":"bigint(20) unsigned","nullable":false,"primary_key":true},{"name":"uid","type":"varchar(12)","nullable":false,"primary_key":false},{"name":"seller_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"title","type":"varchar(200)","nullable":false,"primary_key":false},{"name":"description","type":"longtext","nullable":false,"primary_key":false},{"name":"price","type":"DECIMAL(15,4)","nullable":false,"primary_key":false},{"name":"currency","type":"varchar(10)","nullable":false,"primary_key":false},{"name":"item_condition","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"category_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"location_city","type":"varchar(100)","nullable":false,"primary_key":false},{"name":"location_country","type":"varchar(10)","nullable":false,"primary_key":false},{"name":"lat","type":"DECIMAL(10,7)","nullable":true,"primary_key":false},{"name":"lng","type":"DECIMAL(10,7)","nullable":true,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"is_negotiable","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"is_free","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"views","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":false,"primary_key":false},{"name":"expires_at","type":"datetime","nullable":true,"primary_key":false},{"name":"listing_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"attachment_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"file_url","type":"varchar(2083)","nullable":false,"primary_key":false},{"name":"file_path","type":"varchar(500)","nullable":false,"primary_key":false},{"name":"is_primary","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"sort_order","type":"int(11)","nullable":false,"primary_key":false},{"name":"parent_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"name","type":"varchar(150)","nullable":false,"primary_key":false},{"name":"slug","type":"varchar(150)","nullable":false,"primary_key":false},{"name":"icon","type":"varchar(100)","nullable":false,"primary_key":false},{"name":"sort_order","type":"int(11)","nullable":false,"primary_key":false},{"name":"user_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"listing_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"listing_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"seller_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"buyer_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"rating","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"comment","type":"text","nullable":false,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"listing_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"buyer_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"amount","type":"DECIMAL(15,4)","nullable":false,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"message_thread_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"note","type":"text","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"user_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"label","type":"varchar(100)","nullable":false,"primary_key":false},{"name":"query_json","type":"longtext","nullable":false,"primary_key":false},{"name":"notify","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"last_notified","type":"datetime","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false}],"plugin":{"slug":"6arshid-social-community","name":"6Arshid Social Community","active_installs":0,"version":"1.8.3","wp_org_url":"https://wordpress.org/plugins/6arshid-social-community/"}}