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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$QMX6Uc0zQMNw.ijlikMeUZA622Mt9kFpdL7sgRrj5tgUeNB.jQmNa','admin','ak_e128ba82aba9c61d','2023-07-20 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$iirYTW/rTX0ZtENf9PYvSa2aLG4jQ.hoMQc3NMBaaqO0nlHUnqNUL','user','ak_3ea7988d4d7a529a','2023-07-15 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$H.m7dOkhNOk1PVsYfWwE8bcsXbiZvOGuaR/75NawpuOpt.ri5XGCv','user','ak_fd5318734e44b301','2023-08-28 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$lHVlGL1.IrAt5D5Loi7Gu3gwBWWNHzeuoGJB9KJllu5zc2zBS5oCo','admin','ak_1b276f01af7fb6b5','2023-03-11 10:19: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=34049;

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


