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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$D.ZMbbxXqb41mKxyRCHlcaJlR59Q4IQMAiI9evuD1u7NjIZip8qTY','user','ak_b28de4597e1618c8','2023-05-22 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$h.noHjlw94WTy.WGalRCZwg4EWLvad89riJyqpOg1Px4cCdmd2Ao2','admin','ak_f84839b876e4798d','2023-11-09 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$.PQdqQK51VH8gp9YlThxnWRtHwOuH1Kb8uzZ97i.4od5rcdPB3tx0','admin','ak_6b4d78ef9d7329df','2023-08-26 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$w.Bx/q6ozQU9qBy3.BEeQ2/72Zov.0CWNjpjaPMetGUGxJJROvs.g','admin','ak_2874031993a3ac90','2023-01-16 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$6ChXSQkmNPgUSvhpzDS8aWQiMF6JWEpHDQXCqkt/tA0Vv3VOMCrsd','user','ak_a8b2a66459a0e2e6','2023-07-03 10:15:00',NULL);

