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


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$NlNf.hVBUWDk7Cr9JcLs.3rWPNnFD5Li1i6C9L5IX4bxB2Pk6ol5l','user','ak_0509262e836b9428','2023-12-03 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$U5Dcl4brnctsu.CN188gPZ4tOkkRCaae.TPNN8SETioCYoZ.iaUIt','admin','ak_336a93cce9752fec','2023-12-23 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$m.yfCtZqxtDhgn7hbw5rBO1RBxIBCU.sSvHUtqofmGfL6oandHR4s','user','ak_0d936a53c72248dd','2023-08-21 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$SKspuPU/.O0eSy09LC9Q6cJ2X2actBbsOwJHXuqgGxgaiLxJ215mU','user','ak_85ccedcbcbca5342','2023-08-16 10:03: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=4238;

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

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


