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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$pagD97bxpeDJzZ25rGro6xUNSULNdNds434PWey.f5c9UjGJZSvh.','user','ak_95f82a1f76403696','2023-08-11 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$W.YRzFbJiYBp2WAIMfhGpEqzyfXNM/KFgX/iWcguOu6FbB46Q0NYV','user','ak_98249c77989a6165','2023-12-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$185m7tK4AnPlpv.g/8uljIuhJm.GX558R91XPTyttFKgwcUYAHfuk','user','ak_9a4a9d87eae767f4','2023-11-03 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$tSwa..qC/ARfGZCUPB6EbzamnQ5oOGinAkkPpYy/gqnEydsmoEVzJ','user','ak_f097275594a41afb','2023-11-18 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$j/mV4/wXma/xmg62vwyFJI5Uefvu80TbOJl7Z4QdgTGUAuNz5kAaq','user','ak_72bf05f244a8acff','2023-09-17 10:08: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=35902;

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


