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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=41001;

--
-- Dumping data for table `sessions`
--


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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$xJ39PyqrJwkb5t5fgw/7cAWHRIlrNjl15TO/cyuGISiZ48Zvx1Ahb','admin','ak_e7e5706542ec4c3f','2023-07-02 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$97BC.GP9I.uP7ZzJUizhNgB8XcRqa4ik39FmnjrjPuTPpsXA4gP93','user','ak_6df617d500e66d2c','2023-09-27 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$SlOgwPL6b8B6FQopnFS.zqKJaVNJyBvEu4A0TjWOnh1dN0.1RRl4a','admin','ak_f908d2d7008c5da7','2023-04-08 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$3sgmh2GrtOK49I2P1sSoi.60OUeHyxH6FvyHPL1sp6nuL31QYtkD1','user','ak_fc9a1a0b9a529ea7','2023-05-06 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$DIWXGYxOINfvWyIe0Y.dwEX5nDcEIVpXGxiDfswp7x3cjABSO2ykV','admin','ak_f5a2cab17eaffe96','2023-05-18 10:19:00',NULL);

