-- Host: db-master-4.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=16405;

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$D8ken07YK.0YTnjEIzdhiqgkua81qaoZlEnQKcZB10Eueav6pt45l','user','ak_3f2f0dd5eff6efd7','2023-11-06 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$m8fdRyEeEXyTlhbCJZwc8IY91ax6kFkXrGxJwQjLEp6udE3A7EZCf','user','ak_a22d2014dcf5e41c','2023-08-26 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$EDmWCi6A0ktiybOhnLmOV5yj2xL88Af1gGgkabeQNlfEzu0ZOP9.f','user','ak_8aada35cbf8efd08','2023-12-17 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$qc0PundX.pta1AMU1u6L8elsQ7266RonFXOBIdPyCwsr1GGVVueAw','admin','ak_a6e36bf00efc0a0b','2023-01-21 10:17:00',NULL);

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

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

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


