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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$RyU7rKZ8hDiKDaImc2wiSgPJFmAPGdkEQQYUehQT8VZ/H7zB1gh.n','user','ak_f4e2caacb36a89c9','2023-01-17 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$FkAHZujLJpulXucUQ.PoXniIZFDgBl181Y8ZazLx8yPGmiTdZZiY1','admin','ak_b9d5a594fb10f939','2023-02-23 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$0/Q40EBDa8fB7I/mTW4/9QO4lymwkvXoYATHsxga8sBQBs5lV03Hj','admin','ak_3bd90f2c2fb78aa8','2023-05-12 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$1sVVdevWf6EFUm21NSB1wxLP8ECWG4NiGmtuTu19tGqb1wsUWd10E','user','ak_535edd3bdb7a4455','2023-06-22 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$8LHZojRhUJ..FDPuuabI3GqEMeMdiAtunub8EQgtkSu7unWShrA3X','admin','ak_3a7ea52c567f3d8d','2023-05-11 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$UA3KME.6yDerJUB8QU9tL4DUTW32VuMCNCYPHb1HTml67SxS1gRdO','user','ak_95ca3dd51d6affde','2023-03-04 10:05: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=32632;

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

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


