-- Host: db-master-3.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=33728;

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


--
-- 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=4348;

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$yGzCHcI1ahggCO1NLBEniBc.xDZDzeQrNE3Y3zeEUuzvoEiHG9h.z','user','ak_1b1b0335183aad4d','2023-04-28 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$JwGebGV4CjyEnJF20P/mPiouTPGK7nfLtzmlrz6i04SKi5Mz9A0mE','user','ak_ed5c35418d95802b','2023-06-15 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$2jTmaIkC/bw3VqinQyf9qvCbewU5SIQXC/7vtda5ILr2xI2l36D9D','user','ak_2bc0c1d6e0f04017','2023-04-20 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$XbNOLLn20g16xE3hPfs2Ce/kkK/BEX4iBXjWASY/nkE/W0vVm.qwp','admin','ak_245e6b8865e4565c','2023-03-17 10:14:00',NULL);

--
-- 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=18961;

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


