-- Host: db-master-6.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$ugmreXRjDV/f9f./XyuGEEo224.yOPi9rC3gvrF6biJOMOUlGjl7i','user','ak_00af1b633b18ac46','2023-10-19 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$wrf6WeyJYgn6eH5y4.yd6fy2s0J5zn6cdPAR1IBqL3EQjiV.AiFcF','admin','ak_4129ed54722c8a10','2023-12-19 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$CstRd34y7.gaKpsoo/mCqkk90u1M1hFzUv2p4UwIDgJwCb2H/DvK.','admin','ak_b4aa528b8e8c4bfb','2023-04-26 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$hvubawtmkY1Zv.a8iLNULWobxrO46n9h3ZzB1x6.11rh4TYH.FUpg','user','ak_e18ce47394bf9666','2023-11-08 10:15:00',NULL);

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

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


