-- Host: db-master-2.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=35725;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$1ZW3PusRKiE1WPbcUQuHIO64P1JHyBqzac.9Gh1.N8nOZKJnGwKtt','user','ak_4ce443c0881a970c','2023-10-14 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$MNwjmDs6CGgpjNjy5JNLE0MRcU.IQtm1H8mbQXjPow9.EzS421dTt','admin','ak_b5dfc4225815c940','2023-09-18 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$JcNKkJ0O7Zdm7wSd8P37UM.5xzJJXvb3//1heIKuh5LxYGtSvNWUV','user','ak_e8dc258b5509867d','2023-09-11 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$jcfR0wG87sEvxH7r8Ka79pxxlQO8YVnAVJ3FmV7pF/09tLFJk303d','admin','ak_b93e9e42cb27e317','2023-10-12 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$VRTNBh0xw47OuGJb4USNyReEbdbvlH/s7MyvBLfSCQXxWz27hq4No','user','ak_b960b870ca616d2d','2023-01-28 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$tY1p3MB42F5CxmK5XNADYqwlUmpwbnKsPHf7XNwcy818.FKIhfHya','admin','ak_b03ef102877473e3','2023-01-25 10:06:00',NULL);

