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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$gz.a6HmCpZcu4okdoMzbh7TlTHCh8rOs04jaDYh43tZPfmIIOF.Gx','admin','ak_d567a59d8ed30098','2023-05-25 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$kBloDl3RzmT7garxiCmsEPCfJI0JzUFdsjIdL4lYrtjp7RZ3dkSIR','user','ak_c2d19b2b29366ae2','2023-08-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$iKqLtRT74jotbXLTNrnB8mjNwn8YtgJACmR5SWDhZ9LePUjfVA.Em','user','ak_cd90073cd1c5d253','2023-02-11 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$nmECp7r5Fw/t/aw5OJ5esmTxWHK7kiWoohYU8Mb2wGZFb4fnx4zAO','user','ak_b8da6fc3079b4191','2023-11-10 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$Adg6z7UGdtC7AsFZivDovh4fv38lS1Gtv58ppL3yDSqrbrAGToC0k','user','ak_00401f82a8d8cec6','2023-08-26 10:14:00',NULL);

