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


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

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$zds5FKygtZ1D/P7GttlcgBYCaq/MareHi8Bqtua3eZdEfqtxPMxcd','user','ak_2bdaf798f2ea84cf','2023-07-04 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$UvQFgWgJL9hfd/PV2QJ3CHStfPTQWNNrd9iPWQlsb9CBAQZbbadd1','user','ak_280b65c9d1b3d793','2023-01-03 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$n3hxS6tjU1fliV7NKrU8iS2BxxQZgZ7YHmzyw/Xc1PRa7wr7pvRT5','admin','ak_db7f42179c32a0b8','2023-10-10 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$Nv/sK.idnXaLT9kagZXMbw6Uuz4zmJHUxZs9usD59rkK3XApifNQZ','admin','ak_b0f2bbb328bfe244','2023-07-10 10:07:00',NULL);

