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

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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$5IjMOBAazHQ5xIHRnSwyZUf2PtiqxmvAjvDZq7tW3EXygEqbYQgE4','admin','ak_0c3ffa3169e8fee2','2023-09-23 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$A3GDk/qD4ogaiBndALaD5KzqGoPO9lSLZQmY4e6oy0xr59fHqGWfZ','admin','ak_95190925a3bc9930','2023-03-06 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$X4ZjOANSUWC4eQtWz49KuyINbXUi4rvQGMrGN1lcsOrvt.V1AGpXz','user','ak_b97df022a66df674','2023-08-16 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$U0VQG93gt6eyx7NGYT8XCzNuswAwz5RNMxNPRSiyGnkH4SAmRwViN','user','ak_21d70ae4e941ac16','2023-07-02 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$LeYVxjArFsphsoVnExwfPmLJqHTdeW6m7jdVhezjx870MUlB0WdDy','user','ak_54e76e9e25103894','2023-01-27 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'root@corp.net','$2b$12$OODP4emaDXet6FZdGKTWmLkN1HAq5KS4X37imv10JpB6M/RPuZR1m','user','ak_f65014ccdb2c186d','2023-09-15 10:23: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=36210;

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


