-- Host: db-master-8.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$nIKm0PkfgR7XhRriPrUk6FpinvEq39KmNT5QhQgbd1hhEGvZJ2TF/','admin','ak_4f47aa7ec57d417e','2023-10-24 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$aBgRgXTqth13cITQOyPjys1qcPOj4VN1xW2GcqY.CJlg.VW7iyQAw','admin','ak_3e05f77a5de2d949','2023-03-27 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$WVln3XoZN5Nn4cNnXab10sBeDhdYeGcOiRz7w5D8H9PaUzRnjMfA8','user','ak_3a0ac783bb60490b','2023-04-15 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$a7IqpxCPat/ZOv6izFxzy7KqUTAVo73H00wTPr6lIVVHAw.F6bI2G','user','ak_e469c51069c670c7','2023-11-10 10:11: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=13577;

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


