-- Host: db-master-3.internal    Database: ecommerce


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$A0aTdkUPmZJ/61K4bboEV8V0w4J8UEvTW5iL5e4SlSmcKLm6sm/og','user','ak_0e798e9c939ac5fe','2023-11-08 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$Q1GUiob7vNcMU6FEQxj2AEtuNh/vpy1gdTt9EfMqonsdEX7HrwjIy','admin','ak_65bb448199e02608','2023-06-08 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$EgSXQPr0xYQKoP1VuPDbGAM0MI.c1yldSUVFw3JlsvDDyMVng0dGU','admin','ak_39a0ef8019593ff5','2023-05-14 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$sqGboplnaEl0bOc.OQLWGcY1oUe.gzCrxSEYGpEKwkDBy6gsOZv0F','admin','ak_9482294ade44798b','2023-04-19 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$04sdVeTK6cAPUIGMInMVXgOIFCpw/R3NGULOuIbBif/0XIeV09LoJ','user','ak_ffec1b8df760c4d1','2023-05-07 10:11:00',NULL);

