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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$n7HuXhn88Z/HH/WPtcJrddz0fc2i3lYA82xKcAe4M0GW/emkKsZH/','user','ak_9b1278ac947bc7af','2023-08-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$8cbsDI17bXc3AA9bYVcH/.edO4mhAfvLTxITdCKem17Q1UZtVqRuV','admin','ak_fa9c97e196735eb9','2023-04-21 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$bseHOvEIwTIB4eIonqyeZa8fBrJJzbJ12LXM1UShJpRACgUlZsowK','user','ak_89c29a170836cd1d','2023-04-15 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$V1jwtqH7XVlIcTZhPnCxFM.oGtCkOwikdTDhU.yhzvMAL5ljOmQPK','admin','ak_89136d03db2dc7e1','2023-12-10 10:19:00',NULL);

