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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$HmD6soDk12Naf6OFU2o/d.TGp7z2om9lvplLkGfXlfkXGS93l5AZU','admin','ak_7c928505c4e96095','2023-06-07 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$B0iq0lmFCC02lPGR72DtYuBlWyaKeJv6FjE.BmBdpzszUsApLXAbp','user','ak_a578cd9ad02c47a2','2023-06-20 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$cpe2hbNPeHdgFBd3.Ir6eDpt2LY59g9RlWmCSp5sP8UyNOAKnugZj','admin','ak_d84f0b186be39872','2023-06-26 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$AeqoG7R0oVQblNSpJwa.v98P7mOUlgg99zETotarWa0y4gBlCh7o5','admin','ak_8a15c3f7a35309ad','2023-08-09 10:06:00',NULL);

