-- Host: db-master-0.internal    Database: customers


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

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=39085;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$/fmsm4tMCzsrTYDA40/U/THcBRPaTNxuuN.k7BVcEZ2jXR2z.OcIq','user','ak_6e3a9a6e46ae9e8f','2023-02-11 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$b..mbrhtb3yHEvxIfbAy5gkBUf9uOkrAFlC53etkDXLNIps.Ik2Xs','user','ak_12339b78fb80aefc','2023-04-23 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$ty56lcORqGHlrW1gVL5GWT3bg6uyN6/LsQrnBqDU84YeWi6Zwfm/m','admin','ak_3ed4f29368122ba5','2023-04-10 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$UywsqJmSHk0bH4QxLVE7dIOCMSuMkyiTjEE82llmgCXV96w2klYdL','user','ak_8e6827cc69c4ae55','2023-08-27 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$SNonmR.KTt1IftSpuPmihp2MKv8oVw1QRHENLnorxgw04.VeFfvdL','user','ak_5f909948a96c341c','2023-08-12 10:08:00',NULL);

