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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$KRGO8LVN9jfHljb0k3v7Oteh2VQOd2/DmCvw/YtMyHBWifPwYT1rn','user','ak_c3fa82f0963b2ab1','2023-02-25 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$QDDtZKqQ0mdrLEkj2LJjhNKog.4FeTzbReKLIxefv8TOU9JzVI4l3','user','ak_9baca94550dc41f1','2023-03-19 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$T1Lx1Vxyv2TEobTlNb4AlhBErPvHlrXpFqCYziRfbQL4my.WyTi/4','user','ak_724db83134a86831','2023-05-03 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$XoZHhnwMAj2Yu2.NqYv64t4VjLRObh.3kqVo0MCko.XUXRH.w2UyF','user','ak_4f565ee188215d08','2023-04-25 10:04:00',NULL);

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

--
-- Dumping data for table `payments`
--


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

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


