--
-- Host: localhost    Database: bluesoko
-- ------------------------------------------------------


--
-- Table structure for table `auth_group`
--

CREATE TABLE `auth_group` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_group`
--


--
-- Table structure for table `auth_group_permissions`
--

CREATE TABLE `auth_group_permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` int NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
  KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
  CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_group_permissions`
--


--
-- Table structure for table `auth_permission`
--

CREATE TABLE `auth_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `content_type_id` int NOT NULL,
  `codename` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
  CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `auth_permission`
--

INSERT INTO `auth_permission` VALUES (1,'Can add log entry',1,'add_logentry'),(2,'Can change log entry',1,'change_logentry'),(3,'Can delete log entry',1,'delete_logentry'),(4,'Can view log entry',1,'view_logentry'),(5,'Can add permission',2,'add_permission'),(6,'Can change permission',2,'change_permission'),(7,'Can delete permission',2,'delete_permission'),(8,'Can view permission',2,'view_permission'),(9,'Can add group',3,'add_group'),(10,'Can change group',3,'change_group'),(11,'Can delete group',3,'delete_group'),(12,'Can view group',3,'view_group'),(13,'Can add content type',4,'add_contenttype'),(14,'Can change content type',4,'change_contenttype'),(15,'Can delete content type',4,'delete_contenttype'),(16,'Can view content type',4,'view_contenttype'),(17,'Can add session',5,'add_session'),(18,'Can change session',5,'change_session'),(19,'Can delete session',5,'delete_session'),(20,'Can view session',5,'view_session'),(21,'Can add category',6,'add_category'),(22,'Can change category',6,'change_category'),(23,'Can delete category',6,'delete_category'),(24,'Can view category',6,'view_category'),(25,'Can add order',7,'add_order'),(26,'Can change order',7,'change_order'),(27,'Can delete order',7,'delete_order'),(28,'Can view order',7,'view_order'),(29,'Can add order item',8,'add_orderitem'),(30,'Can change order item',8,'change_orderitem'),(31,'Can delete order item',8,'delete_orderitem'),(32,'Can view order item',8,'view_orderitem'),(33,'Can add product',9,'add_product'),(34,'Can change product',9,'change_product'),(35,'Can delete product',9,'delete_product'),(36,'Can view product',9,'view_product'),(37,'Can add product image',10,'add_productimage'),(38,'Can change product image',10,'change_productimage'),(39,'Can delete product image',10,'delete_productimage'),(40,'Can view product image',10,'view_productimage'),(41,'Can add shop',11,'add_shop'),(42,'Can change shop',11,'change_shop'),(43,'Can delete shop',11,'delete_shop'),(44,'Can view shop',11,'view_shop'),(45,'Can add shop rating',12,'add_shoprating'),(46,'Can change shop rating',12,'change_shoprating'),(47,'Can delete shop rating',12,'delete_shoprating'),(48,'Can view shop rating',12,'view_shoprating'),(49,'Can add region',13,'add_region'),(50,'Can change region',13,'change_region'),(51,'Can delete region',13,'delete_region'),(52,'Can view region',13,'view_region'),(53,'Can add user',14,'add_user'),(54,'Can change user',14,'change_user'),(55,'Can delete user',14,'delete_user'),(56,'Can view user',14,'view_user'),(57,'Can add profile',15,'add_profile'),(58,'Can change profile',15,'change_profile'),(59,'Can delete profile',15,'delete_profile'),(60,'Can view profile',15,'view_profile'),(61,'Can add seller profile',16,'add_sellerprofile'),(62,'Can change seller profile',16,'change_sellerprofile'),(63,'Can delete seller profile',16,'delete_sellerprofile'),(64,'Can view seller profile',16,'view_sellerprofile');

--
-- Table structure for table `bluesoko_category`
--

CREATE TABLE `bluesoko_category` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(50) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_category`
--

INSERT INTO `bluesoko_category` VALUES (1,'Food','food',1),(2,'test product','test-product',1);

--
-- Table structure for table `bluesoko_order`
--

CREATE TABLE `bluesoko_order` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `phone` varchar(20) NOT NULL,
  `address` longtext NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `status` varchar(20) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `delivery_status` varchar(20) NOT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bluesoko_order_user_id_210789d7_fk_main_user_id` (`user_id`),
  CONSTRAINT `bluesoko_order_user_id_210789d7_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_order`
--

INSERT INTO `bluesoko_order` VALUES (1,'0710 100 678','kimara',5000.00,'pending','2026-02-17 07:22:25.879256','pending',1),(3,'e.g. 0710 100 678','kigamboni',270000.00,'completed','2026-02-17 08:30:31.735408','pending',1),(4,'0710 100 678','kigamboni',30000.00,'cancelled','2026-02-17 08:33:27.632369','pending',1);

--
-- Table structure for table `bluesoko_orderitem`
--

CREATE TABLE `bluesoko_orderitem` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `quantity` int unsigned NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `status` varchar(20) NOT NULL,
  `order_id` bigint NOT NULL,
  `seller_id` bigint NOT NULL,
  `product_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bluesoko_orderitem_order_id_cc3b74a0_fk_bluesoko_order_id` (`order_id`),
  KEY `bluesoko_orderitem_seller_id_14892cfd_fk_main_user_id` (`seller_id`),
  KEY `bluesoko_orderitem_product_id_2b5d7c2e_fk_bluesoko_product_id` (`product_id`),
  CONSTRAINT `bluesoko_orderitem_order_id_cc3b74a0_fk_bluesoko_order_id` FOREIGN KEY (`order_id`) REFERENCES `bluesoko_order` (`id`),
  CONSTRAINT `bluesoko_orderitem_product_id_2b5d7c2e_fk_bluesoko_product_id` FOREIGN KEY (`product_id`) REFERENCES `bluesoko_product` (`id`),
  CONSTRAINT `bluesoko_orderitem_seller_id_14892cfd_fk_main_user_id` FOREIGN KEY (`seller_id`) REFERENCES `main_user` (`id`),
  CONSTRAINT `bluesoko_orderitem_chk_1` CHECK ((`quantity` >= 0))
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_orderitem`
--

INSERT INTO `bluesoko_orderitem` VALUES (1,1,5000.00,'pending',1,3,1),(3,3,90000.00,'completed',3,2,4),(4,1,30000.00,'cancelled',4,2,4);

--
-- Table structure for table `bluesoko_product`
--

CREATE TABLE `bluesoko_product` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(50) DEFAULT NULL,
  `description` longtext NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `stock` int unsigned NOT NULL,
  `negotiable` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `is_deleted` tinyint(1) NOT NULL,
  `category_id` bigint DEFAULT NULL,
  `shop_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `bluesoko_product_category_id_96c2b4ee_fk_bluesoko_category_id` (`category_id`),
  KEY `bluesoko_product_shop_id_2b5038c0_fk_bluesoko_shop_id` (`shop_id`),
  KEY `bluesoko_pr_slug_581287_idx` (`slug`),
  KEY `bluesoko_pr_price_8f1e89_idx` (`price`),
  KEY `bluesoko_pr_is_acti_433917_idx` (`is_active`),
  KEY `bluesoko_pr_created_bebe4c_idx` (`created_at`),
  CONSTRAINT `bluesoko_product_category_id_96c2b4ee_fk_bluesoko_category_id` FOREIGN KEY (`category_id`) REFERENCES `bluesoko_category` (`id`),
  CONSTRAINT `bluesoko_product_shop_id_2b5038c0_fk_bluesoko_shop_id` FOREIGN KEY (`shop_id`) REFERENCES `bluesoko_shop` (`id`),
  CONSTRAINT `bluesoko_product_chk_1` CHECK ((`stock` >= 0))
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_product`
--

INSERT INTO `bluesoko_product` VALUES (1,'dagaa','dagaa','daga wanaongeza madini',5000.00,99,0,1,'2026-02-16 13:47:15.712817',0,1,2),(2,'product1','product1','this is product 1',10000.00,10,1,1,'2026-02-16 15:09:43.030730',0,2,1),(3,'product2','product2','this is product 2',20000.00,20,1,1,'2026-02-16 15:18:09.485072',0,2,1),(4,'product3','product3','this is product 3',30000.00,0,0,0,'2026-02-16 15:21:35.564545',0,2,1),(5,'Product3','product3-1','',30000.00,30,0,1,'2026-02-17 08:05:05.474285',0,2,1);

--
-- Table structure for table `bluesoko_productimage`
--

CREATE TABLE `bluesoko_productimage` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `image` varchar(100) NOT NULL,
  `product_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bluesoko_productimage_product_id_24d0e9aa_fk_bluesoko_product_id` (`product_id`),
  CONSTRAINT `bluesoko_productimage_product_id_24d0e9aa_fk_bluesoko_product_id` FOREIGN KEY (`product_id`) REFERENCES `bluesoko_product` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_productimage`
--

INSERT INTO `bluesoko_productimage` VALUES (1,'products/bluesoko_product_IMG-20230309-WA0108_1771249570107.webp',1),(2,'products/bluesoko_product_IMG-20230309-WA0113_-_Copy_1771249570343.webp',1),(3,'products/bluesoko_product_IMG-20230309-WA0114_1771249570929.webp',1),(4,'products/bluesoko_product_IMG-20230309-WA0111_1771254556657.webp',2),(5,'products/bluesoko_product_IMG-20230309-WA0124_1771255075119.webp',3),(6,'products/bluesoko_product_IMG-20230314-WA0018_1771255269998.webp',4),(7,'products/bluesoko_product_IMG-20230314-WA0018_1771315492936.webp',5),(8,'products/IMG-20230314-WA0002.jpg',4),(9,'products/IMG-20230314-WA0002_4bME2Yw.jpg',4);

--
-- Table structure for table `bluesoko_shop`
--

CREATE TABLE `bluesoko_shop` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `slug` varchar(50) DEFAULT NULL,
  `is_approved` tinyint(1) NOT NULL,
  `description` longtext NOT NULL,
  `phone` varchar(20) NOT NULL,
  `latitude` double DEFAULT NULL,
  `longitude` double DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `owner_id` bigint NOT NULL,
  `region_id` bigint DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `owner_id` (`owner_id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `bluesoko_shop_region_id_bbc7d2e1_fk_main_region_id` (`region_id`),
  CONSTRAINT `bluesoko_shop_owner_id_8f96320d_fk_main_user_id` FOREIGN KEY (`owner_id`) REFERENCES `main_user` (`id`),
  CONSTRAINT `bluesoko_shop_region_id_bbc7d2e1_fk_main_region_id` FOREIGN KEY (`region_id`) REFERENCES `main_region` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_shop`
--

INSERT INTO `bluesoko_shop` VALUES (1,'sharo1','sharo1',1,'karibu dukani kwetu ujipatie huduma bora zaidi','+255 785 943 700',-6.8620306,39.2640524,'2026-02-16 02:18:47.323258',2,3),(2,'shop2','shop2',1,'karibuni katika duka letu tukuhudumie kifalme zaidi','+255 785 943 642',-6.795999443528797,39.222687451198254,'2026-02-16 02:36:38.536746',3,9),(3,'shop3','shop3',1,'karibu Dodoma kwa mahitaji ya uduma zetu','+255700182080',-6.795968184864348,39.222692503575644,'2026-02-16 03:14:20.567097',4,3);

--
-- Table structure for table `bluesoko_shoprating`
--

CREATE TABLE `bluesoko_shoprating` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `rating` int unsigned NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `shop_id` bigint NOT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `bluesoko_shoprating_shop_id_user_id_8ab9ec81_uniq` (`shop_id`,`user_id`),
  KEY `bluesoko_shoprating_user_id_932f28cd_fk_main_user_id` (`user_id`),
  CONSTRAINT `bluesoko_shoprating_shop_id_59bac52d_fk_bluesoko_shop_id` FOREIGN KEY (`shop_id`) REFERENCES `bluesoko_shop` (`id`),
  CONSTRAINT `bluesoko_shoprating_user_id_932f28cd_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`),
  CONSTRAINT `bluesoko_shoprating_chk_1` CHECK ((`rating` >= 0))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `bluesoko_shoprating`
--


--
-- Table structure for table `django_admin_log`
--

CREATE TABLE `django_admin_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `action_time` datetime(6) NOT NULL,
  `object_id` longtext,
  `object_repr` varchar(200) NOT NULL,
  `action_flag` smallint unsigned NOT NULL,
  `change_message` longtext NOT NULL,
  `content_type_id` int DEFAULT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`),
  KEY `django_admin_log_user_id_c564eba6_fk_main_user_id` (`user_id`),
  CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  CONSTRAINT `django_admin_log_user_id_c564eba6_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`),
  CONSTRAINT `django_admin_log_chk_1` CHECK ((`action_flag` >= 0))
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_admin_log`
--

INSERT INTO `django_admin_log` VALUES (1,'2026-02-16 02:38:17.209712','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(2,'2026-02-16 03:15:22.603821','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\", \"Description\"]}}]',11,1),(3,'2026-02-16 03:20:14.901794','1','shop1',2,'[{\"changed\": {\"fields\": [\"Name\", \"Is approved\"]}}]',11,1),(4,'2026-02-16 03:23:44.070794','1','shop1',2,'[{\"changed\": {\"fields\": [\"Is approved\", \"Region\"]}}]',11,1),(5,'2026-02-16 03:23:50.512202','2','shop2',2,'[]',11,1),(6,'2026-02-16 03:24:08.500750','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\", \"Region\"]}}]',11,1),(7,'2026-02-16 03:24:22.089019','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(8,'2026-02-16 09:02:46.172556','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(9,'2026-02-16 09:03:08.242077','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(10,'2026-02-16 09:03:25.725195','1','shop1',2,'[]',11,1),(11,'2026-02-16 09:03:36.001113','1','shop1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(12,'2026-02-16 10:27:39.967880','3','shop3',2,'[]',11,1),(13,'2026-02-16 11:43:31.739349','1','shop1',2,'[{\"changed\": {\"fields\": [\"Region\"]}}]',11,1),(14,'2026-02-16 11:44:53.576805','1','shop1',2,'[{\"changed\": {\"fields\": [\"Region\"]}}]',11,1),(15,'2026-02-16 12:04:25.528183','1','shop1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(16,'2026-02-16 13:17:19.388965','1','shop1',2,'[{\"changed\": {\"fields\": [\"Latitude\", \"Longitude\"]}}]',11,1),(17,'2026-02-16 13:17:52.944037','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Name\", \"Slug\"]}}]',11,1),(18,'2026-02-16 13:18:11.904293','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(19,'2026-02-16 13:21:20.608537','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Latitude\", \"Longitude\"]}}]',11,1),(20,'2026-02-16 13:51:35.040904','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(21,'2026-02-16 13:51:54.035475','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(22,'2026-02-16 21:13:46.372047','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(23,'2026-02-16 21:14:22.927021','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(24,'2026-02-16 21:14:59.490667','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(25,'2026-02-16 21:55:59.764770','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(26,'2026-02-16 21:56:34.629384','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(27,'2026-02-17 00:01:04.026867','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(28,'2026-02-17 00:35:29.138684','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(29,'2026-02-17 00:35:44.840526','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(30,'2026-02-17 07:13:39.493304','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(31,'2026-02-17 07:13:53.205330','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(32,'2026-02-17 07:14:13.676505','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(33,'2026-02-17 07:15:27.356740','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(34,'2026-02-17 07:15:48.298116','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(35,'2026-02-17 07:17:34.606738','3','shop3',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(36,'2026-02-17 07:18:02.854872','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(37,'2026-02-17 07:22:02.125386','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(38,'2026-02-17 07:24:29.375695','2','shop2',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(39,'2026-02-17 07:24:35.945280','1','sharo1',2,'[{\"changed\": {\"fields\": [\"Is approved\"]}}]',11,1),(40,'2026-02-17 08:03:26.761336','4','product3',2,'[{\"changed\": {\"fields\": [\"Stock\"]}}]',9,1),(41,'2026-02-17 08:09:38.694853','4','product3',2,'[{\"changed\": {\"fields\": [\"Stock\"]}}, {\"added\": {\"name\": \"product image\", \"object\": \"ProductImage object (8)\"}}]',9,1),(42,'2026-02-17 08:09:38.846437','4','product3',2,'[{\"added\": {\"name\": \"product image\", \"object\": \"ProductImage object (9)\"}}]',9,1),(43,'2026-02-17 08:10:13.146664','4','product3',2,'[]',9,1),(44,'2026-02-17 08:10:26.205670','4','product3',2,'[{\"changed\": {\"fields\": [\"Is deleted\"]}}]',9,1),(45,'2026-02-17 08:13:28.057798','2','Order #2 - Michael',2,'[{\"changed\": {\"fields\": [\"Phone\", \"Status\"]}}]',7,1),(46,'2026-02-17 08:29:34.756967','2','Order #2 - Michael',3,'',7,1);

--
-- Table structure for table `django_content_type`
--

CREATE TABLE `django_content_type` (
  `id` int NOT NULL AUTO_INCREMENT,
  `app_label` varchar(100) NOT NULL,
  `model` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_content_type`
--

INSERT INTO `django_content_type` VALUES (1,'admin','logentry'),(3,'auth','group'),(2,'auth','permission'),(6,'bluesoko','category'),(7,'bluesoko','order'),(8,'bluesoko','orderitem'),(9,'bluesoko','product'),(10,'bluesoko','productimage'),(11,'bluesoko','shop'),(12,'bluesoko','shoprating'),(4,'contenttypes','contenttype'),(15,'main','profile'),(13,'main','region'),(16,'main','sellerprofile'),(14,'main','user'),(5,'sessions','session');

--
-- Table structure for table `django_migrations`
--

CREATE TABLE `django_migrations` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `app` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `applied` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `django_migrations`
--

INSERT INTO `django_migrations` VALUES (1,'contenttypes','0001_initial','2026-02-16 00:12:58.954313'),(2,'contenttypes','0002_remove_content_type_name','2026-02-16 00:13:00.106108'),(3,'auth','0001_initial','2026-02-16 00:13:05.173657'),(4,'auth','0002_alter_permission_name_max_length','2026-02-16 00:13:06.550098'),(5,'auth','0003_alter_user_email_max_length','2026-02-16 00:13:06.617331'),(6,'auth','0004_alter_user_username_opts','2026-02-16 00:13:06.699271'),(7,'auth','0005_alter_user_last_login_null','2026-02-16 00:13:06.808899'),(8,'auth','0006_require_contenttypes_0002','2026-02-16 00:13:06.903998'),(9,'auth','0007_alter_validators_add_error_messages','2026-02-16 00:13:06.978850'),(10,'auth','0008_alter_user_username_max_length','2026-02-16 00:13:07.061102'),(11,'auth','0009_alter_user_last_name_max_length','2026-02-16 00:13:07.144704'),(12,'auth','0010_alter_group_name_max_length','2026-02-16 00:13:07.339775'),(13,'auth','0011_update_proxy_permissions','2026-02-16 00:13:07.456195'),(14,'auth','0012_alter_user_first_name_max_length','2026-02-16 00:13:07.586913'),(15,'main','0001_initial','2026-02-16 00:13:22.202182'),(16,'admin','0001_initial','2026-02-16 00:13:25.575301'),(17,'admin','0002_logentry_remove_auto_add','2026-02-16 00:13:25.668246'),(18,'admin','0003_logentry_add_action_flag_choices','2026-02-16 00:13:25.766210'),(19,'bluesoko','0001_initial','2026-02-16 00:13:29.083167'),(20,'bluesoko','0002_initial','2026-02-16 00:13:44.451546'),(21,'sessions','0001_initial','2026-02-16 00:13:45.117375');

--
-- Table structure for table `main_profile`
--

CREATE TABLE `main_profile` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `avatar` varchar(100) DEFAULT NULL,
  `address` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`),
  CONSTRAINT `main_profile_user_id_b40d720a_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `main_profile`
--

INSERT INTO `main_profile` VALUES (1,'profiles/IMG-20240614-WA0079_Feb_3_2026_03_52_51_AM.png','Ubungo kibangu','2026-02-16 00:48:56.222395',1),(2,'profiles/IMG-20230314-WA0003.jpg','Agrey kariakoo','2026-02-16 01:32:21.307337',2),(3,'profiles/IMG-20230309-WA0133.jpg','njiro','2026-02-16 02:35:07.645905',3),(4,'profiles/IMG-20230309-WA0138.jpg','dodoma mjini','2026-02-16 02:55:50.895557',4),(5,'','','2026-02-16 12:02:47.038478',5);

--
-- Table structure for table `main_region`
--

CREATE TABLE `main_region` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(50) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `main_region`
--

INSERT INTO `main_region` VALUES (1,'Arusha','arusha',1),(2,'Dar es Salaam','dar_es_salaam',1),(3,'Dodoma','dodoma',1),(4,'Geita','geita',1),(5,'Iringa','iringa',1),(6,'Kagera','kagera',1),(7,'Katavi','katavi',1),(8,'Kigoma','kigoma',1),(9,'Kilimanjaro','kilimanjaro',1),(10,'Lindi','lindi',1),(11,'Manyara','manyara',1),(12,'Mara','mara',1),(13,'Mbeya','mbeya',1),(14,'Morogoro','morogoro',1),(15,'Mtwara','mtwara',1),(16,'Mwanza','mwanza',1),(17,'Njombe','njombe',1),(18,'Pemba North','pemba_north',1),(19,'Pemba South','pemba_south',1),(20,'Pwani','pwani',1),(21,'Rukwa','rukwa',1),(22,'Ruvuma','ruvuma',1),(23,'Shinyanga','shinyanga',1),(24,'Simiyu','simiyu',1),(25,'Singida','singida',1),(26,'Songwe','songwe',1),(27,'Tabora','tabora',1),(28,'Tanga','tanga',1),(29,'Unguja North','unguja_north',1),(30,'Unguja South','unguja_south',1),(31,'Zanzibar West','zanzibar_west',1);

--
-- Table structure for table `main_sellerprofile`
--

CREATE TABLE `main_sellerprofile` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `business_name` varchar(255) NOT NULL,
  `business_email` varchar(254) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `region_id` bigint DEFAULT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`),
  KEY `main_sellerprofile_region_id_a5dade46_fk_main_region_id` (`region_id`),
  CONSTRAINT `main_sellerprofile_region_id_a5dade46_fk_main_region_id` FOREIGN KEY (`region_id`) REFERENCES `main_region` (`id`),
  CONSTRAINT `main_sellerprofile_user_id_86ce50d4_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `main_sellerprofile`
--

INSERT INTO `main_sellerprofile` VALUES (1,'shop1 Tech','shop1underseller1@gmail.com','2026-02-16 01:31:42.813118',2,2),(2,'BlueMike Tech','shayomichael174@gmail.com','2026-02-16 02:34:04.498143',1,3),(3,'BlueMike Tech','Hansmichael174@gmail.com','2026-02-16 02:54:18.367953',9,4),(4,'shop4 Tech','seller4174@gmail.com','2026-02-16 12:01:47.377249',17,5);

--
-- Table structure for table `main_user_groups`
--

CREATE TABLE `main_user_groups` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `group_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main_user_groups_user_id_group_id_ae195797_uniq` (`user_id`,`group_id`),
  KEY `main_user_groups_group_id_a337ba62_fk_auth_group_id` (`group_id`),
  CONSTRAINT `main_user_groups_group_id_a337ba62_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
  CONSTRAINT `main_user_groups_user_id_df502602_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `main_user_groups`
--


--
-- Table structure for table `main_user_user_permissions`
--

CREATE TABLE `main_user_user_permissions` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main_user_user_permissions_user_id_permission_id_96b9fadf_uniq` (`user_id`,`permission_id`),
  KEY `main_user_user_permi_permission_id_cd2b56a3_fk_auth_perm` (`permission_id`),
  CONSTRAINT `main_user_user_permi_permission_id_cd2b56a3_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  CONSTRAINT `main_user_user_permissions_user_id_451ce57f_fk_main_user_id` FOREIGN KEY (`user_id`) REFERENCES `main_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `main_user_user_permissions`
--



