-- Host: db-master-2.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$j/tg2eGfm2/YPH78vdGGaEbW7hLiTyHQ8NBsQzuP4lzEnj9qN7BLa','user','ak_a6b693c76e60ed85','2023-01-01 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$lgpXxPj67fhtpHcdBWD4r6ZuZqA6PNSRL9Pm15PQGL2DapKCn4Icq','user','ak_f1d079417fcbe48c','2023-02-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$mwhtd2DtKphvGqQ5xyBbwHvaGv1fR/0bEKVqy8vcn5TTsDSLPueik','admin','ak_468ae1bc8e410498','2023-09-25 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$vzR2ekVTJFPgGaJuQ6WdTO7jfCIw.H/jNhjj0jpmOo/2Xu.pokjFu','user','ak_25ae3874a1e53a7e','2023-11-10 10:08:00',NULL);

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

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


