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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$80UaoB.kkzf9scl26bq8pfqzq/9hmFYZl0nTC2/FJLkA1aASOVCyq','user','ak_5f088ed6a36d0e72','2023-07-25 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$pZzLeWGzB4tteeL5fRb/vg3I2tdrAofVrQajwZp.KV0alNHJXAzB.','admin','ak_8aa9728a70a32c8d','2023-06-16 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$mSxeoBoycHOxgRunEsPIDakL6X.PJ/xB/araSHMRzncDoHt.fxBUo','user','ak_61255c2178d4ad05','2023-09-22 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$juLNC4Qf1qdGPLlkI9Zza2TTpZaRj/Bte0HTHvyGDEeszIqiSR9Mc','user','ak_9c11d765227a3626','2023-07-12 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$H9A04x83DVWqSO5kdUhg8ftcBH0s0rm6IG8iCLFZy5IPuTEv6jTCt','user','ak_98cfc0ccf22fee0d','2023-05-05 10:20: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=36521;

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

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


