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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$4KsnQJI3EQh5lmnbnYbG3lWN5fcOmwKvUdyEeRJX2D5VsglbQllCt','user','ak_f06b307140194be8','2023-12-06 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$l1K/uSP3wccZDX7qfSaX9PgG6VBx88.BCzmwYQgXSB9ypxcOVCM9H','user','ak_0cde51d82a2e827c','2023-05-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$ErSHROxlKw0KS2dOlfpp5Qnew7ZwoGMjEToKOhdHbG2MwZMH.vXbl','user','ak_175cefef3641a243','2023-09-28 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$ZmWQD0OQsd38l9J3QMZv1bm.sPJVAaGSnHBQ8eCTZtQOGrKaFtqFF','user','ak_15f2681cc196b4bb','2023-06-08 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$TrF2UtvLQPp64F/asKIuuSJFUFpMi2zxPCGXT54poba63KTGlG8eG','admin','ak_09de5d166302c904','2023-08-03 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$a3.8PFTHhHOnlnHvLArGmWfljLBwHyHpGnkBTGnzUR0xU.HpLEeBT','admin','ak_71a2ce42e456ac87','2023-08-13 10:05:00',NULL);
INSERT INTO `users` VALUES (7,'dev_ops@example.org','$2b$12$vDCSDlBe5KmMZl1agnDfDbu4JqQyNm7CyvEwOpU/Zr21isReMpLJx','user','ak_fd67299235ae303c','2023-10-08 10:08:00',NULL);

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

--
-- Dumping data for table `payments`
--


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

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


