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

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


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

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$6A/5fcIlDFE820/2HYbBjvNirFYrDFvZj6eIDBccrqsFhWKC/K9XF','user','ak_62c1f8c0b5b573e7','2023-03-15 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$RHzUQIOxdUA0eKlTDK.9EVNyc7h87.N.Nhm2XNSG6oUbiLX3mSfk3','user','ak_94a0c079fef28b88','2023-06-10 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$9FpXXPjSB.KDDOvT3vJuJdRW7Z2wM6uXUI813osQ180cwHh.Agda3','admin','ak_13646e3f31b53dea','2023-07-18 10:09:00',NULL);

