-- Host: db-master-9.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=10054;

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$9K4h81jPLciXAhl3uUlsAMDMCLCJ0xdhUpYVMJbLD9CzU.j/RCAev','user','ak_f9c03025163f4550','2023-07-25 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$d.jooFX8SC0KFaNpb0Kylvoen/G.KiTBqzjuBviSJP5eKGOj3TG97','admin','ak_174ae9a252f7c2e2','2023-06-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$dMfdrk2ZqhXKagnsg307RTtEXtps7jTADhTWjaUckOGBJQfpkJ7uU','admin','ak_214531561fe739eb','2023-02-02 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$3XzVtPEpVoAUqoEvBa4McYEmLZPHDafGDCRjr8Eay39CVRlSYXLnr','user','ak_27913733fe36deed','2023-12-26 10:14:00',NULL);

