-- Host: db-master-1.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=17262;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$/1M5AQrYeb6oSC8ZhOY4SOYvwrxgIrskijsCD4/nbeGNbbs/l0jD0','admin','ak_55a18be6891c134f','2023-08-05 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$B1bEbKtV9HCHijs9UfukoHOJsQgpR9aP8ijlO0cWCwOO5Ddp6IgBW','user','ak_0d41afd7be547a1a','2023-10-22 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$bStfNNE1Oi/C9mb8VMo5jutYR8q54cwI7UQ6Qp6fb5YGbHBWSzXV3','user','ak_681fbdd157364aa1','2023-10-11 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$fXKIZOC4VQo7mVF2wDn1qDepHuooKzPx39AkKKad35zOMDi/HKyg6','user','ak_788b9dcb7018874a','2023-07-16 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$vxnizqESzdP0bT7IpVr388Cq6McPwu.oU0177CUH66Xwp9xHAc1Ao','user','ak_69c021fcce9c5e40','2023-02-02 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$QVJfBXg62d7JwJc4va3OhDOoAaZYJf.aLjkekVlpICAWsbhpf02Ye','user','ak_db72cea496f1ff1d','2023-10-12 10:10: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=46593;

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


