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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$pXnSzEn4WHx38ypvBC4.ZHna/mfhqow4.l3cnc0SLE6h9LSvBIul.','user','ak_1916782eeb4afaf2','2023-04-22 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$tPkwbtIdPPGB5CYYeV2z.Es7yCbcY7VarJ1tDv.9EkIJ/rpZj/PYm','admin','ak_d4c4bb14dd2426a4','2023-12-16 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$f2ftOPP6PZHlBSR.c5x/Sp/7LEy.Owxc6Kk91hNV63MfHil3JPGju','admin','ak_17f5dfbc379a94b7','2023-11-07 10:10: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=35341;

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


