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

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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$YeT2toWgfiPOQEnRBAkBE1x33wimCPOFcXjE1EUEOQQEUM/VFY.aR','user','ak_e931eb119fbb6164','2023-06-06 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$fbqH98i/rS7JmPwCi09.EuiutYjRLgs8O1I/v/2RPvLiphitfRolW','admin','ak_4c093aa2f3e9f072','2023-06-22 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$u5BlVEabJa1oFKGJV6CNFNsXIfSu/RJeK6pzBvsUyoWNlJWXOYKpQ','admin','ak_e57817aa052bb1a3','2023-09-17 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$IZ7yyfWnANgJyE0lxCi2OwLGuTaQf.z56dqssugIc8rO5wG/qMslQ','user','ak_0f57c3e9e48d7849','2023-07-06 10:07:00',NULL);

