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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=18174;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$KMPJQGBa8CAci8/3t9j/9lnASAKEXNfSyRaTsH6z.CH8Gvdz8MLrt','admin','ak_b8455d322ed931f2','2023-11-16 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$NsKQoib6IK.lDPqHmRm9hekm7HjTURxWWgaJ8QlRndZy85qCV8rOn','admin','ak_2b8130e666ce7b40','2023-10-28 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$ZSVPixzNoGKFA4Vt9KHOyvrX3UxbC7iY0X9dsUBYUHQwe69l.cAp6','user','ak_41c6be870f1d02d6','2023-07-22 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$Vw0Owfqiw/.4YGReyhUaSwElXXqLwD/0bnJHkq4slAJmhBJD.q26z','admin','ak_ae2dfa7c3de4f73c','2023-03-27 10:08:00',NULL);

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

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


