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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$XHy9wb/zTevNZrQxgVLHkzm232fA7KZAYxaDG4QDhANVnZka.Hs3U','user','ak_5bddb0f274611dbb','2023-04-14 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$/vHJu3PHKnH1H7v7801OBOFenVKNS1XfAKWVVqCinaf.pVVnxMyh7','user','ak_5a55216d9d411e3d','2023-09-04 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$hccDyXKEmYjZpDhc1xIgLClH7h6LMnDgLkCC5khQR4p2WufFKW.ZZ','admin','ak_b61f902cef910234','2023-01-18 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$AXsGPdMrupui/pqt.tEkz3BOhK06O/08JgELB4QhfwCIU8z/BS4fe','user','ak_95ed04497a1661dd','2023-06-14 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$2x2J0IZHXp3RKeS/qTvkZMNrJD9fmYudsv85mjLe3g4PlnCNLiDGk','user','ak_d4ab16f40add378e','2023-07-14 10:06:00',NULL);

