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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$SzOWoiBWqIi21kiskZQAZrKsT3uxjyLivElTRYqMojWAUI9lj4sfe','user','ak_1326439ddfeb6117','2023-08-05 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$frWogUUFK59KOSJt3DEjiu3gwBofMNAxNftg9qrW5sVFIkgYAewEc','admin','ak_152e9c654f76ca07','2023-11-02 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$qaYX1Spsem4mSBuh21nvVLu1t9kW9i8wv4Px3mv9Q4vBXeohS8HW.','user','ak_9855d01f958f2772','2023-02-05 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$dngTqhqjXsTMeAbg4ngLvcLlsdztH.gN65.78mcWrU5ggxvYbXDaH','user','ak_e09ce051d7a97500','2023-10-12 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$Ni8ErvXANvRHaCq1phhPkUkKfNisKXyv2R7iP6upcBNusRoPFiBC3','admin','ak_bd674117621a2cca','2023-07-26 10:01:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=20704;

--
-- Dumping data for table `audit_log`
--


