-- Host: db-master-6.internal    Database: ecommerce


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=28712;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=21175;

--
-- Dumping data for table `payments`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=27582;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$HoIgquJZGLejarXOTnHb1zMjS.x.EPABO232BlK70l1oqSHozppcX','user','ak_741674a9ff4502fe','2023-08-25 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$bIZM5Fz2iqTOLuA9nm8BmG4zLJLn79v9j3Bpf7Xg2cp05E.wqtG/s','user','ak_526a111cbf7ac567','2023-02-10 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$IxCSxhawyIBw3n26JHYW631OcI1ATPOWwyhwo2nSCi4HXLbp8SiMq','admin','ak_4f58e0d0decdb3d2','2023-01-28 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$pCCyCXSHwQ2lIGtD.cOF52B7RYhLEc1LsXrHRBDFn5Qw1XXl5QP3q','admin','ak_01bcba47df51c228','2023-11-23 10:12:00',NULL);

