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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$6PYFHryy.Rkrv1Y80kSUR2twzDciPK6Fx37gsCBP990jM8ShMUCZc','user','ak_b638c2eb0dec7484','2023-12-17 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$YvIP3Azf/ZX33J3UudVuiUJ7nnJOJrPh1a/lUw1CLpKeWc9DAB3rU','user','ak_c7bdc78183b3bfe7','2023-06-05 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$ZBOo4YPgo3hJ9ShpCszDzjhsTYYxmbaClmm96kKpMGDOv7s5aouIH','user','ak_33d15f9c72398587','2023-07-02 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$yZVyytFVHsP.Iov4S7BzDLr7uQ5tEIIzgpJ8gJ67.L.lu8mMvZ5eW','user','ak_865602c05ebce73b','2023-01-20 10:03: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=29670;

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


