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

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$WsdlsEDp4TMUFzGEI6RNXs6W9kUAR.p1RkqRng1x1n1eT9ZAIWSHY','admin','ak_f63d9b13062d6eec','2023-05-25 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$.86nnbe.tRbENy2dJIPJydli6sV4G3EuNmR9tFc5hCJUJ6e/ef9o5','user','ak_2431d6480f499553','2023-12-23 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$ePrtX42YTp57rYaNlR0YoCp5yGx3pmMWgZH8oi9C9YUhUg9j2EGw6','admin','ak_eb4718e2061e4be6','2023-05-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$pACAofaxg6ZeBbDPfy.X51F8.E5yKOeM45rlv400FONczQel0gree','admin','ak_e45c4b7cbdf4f20e','2023-03-12 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$7UHkZ5UDgdPJzsIkCsZrW8wjRsYd4dt46lNHzdL.N.4Jz1Knom4it','admin','ak_b013ba3ca1c9acfa','2023-08-08 10:19:00',NULL);

