-- Host: db-master-6.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=5683;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$/dgPlQBB3TndiBwR49qWMJ/xTXX/LDUDgwJ5pO86ZY/QyJHbFRs8V','admin','ak_e136ad55ee7ba7a0','2023-09-01 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$2z3tB2TMifb2eJqNj08pGP83JW3Gi836EDsqKoyBjhNv0KUJ/VH.c','user','ak_9d69aeba95481a0c','2023-08-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$ttqaSHZGSELibRfEqyy8xj5VevFKSeuY0qAsuUMscv331DaaD9QyF','user','ak_b17e7f0efed4805e','2023-06-18 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$VtmRwkEzxcyFVQIODThXwmhtTGbjKY/GxF4WUgl8N/55OE78sQRZF','user','ak_02607693bd23690b','2023-03-25 10:10:00',NULL);

