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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$m1fswuzMjwLGG8TpDsdY6vlNmdgIoqtE6aPB90yH87cYtCM7fDFoQ','admin','ak_1d3c04df501b6db1','2023-05-20 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$iGquH4a8r4fcs2lNWRV9dQ8y87.DisbbZQ2N1u93KsSOa4XytDxgc','user','ak_ce6f1efe02b8bbba','2023-07-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$FMpCWVu4BJ9AUUpHTxLXDtMFVb9rQNrD986eciNdaksP3prCzHMgZ','user','ak_f49e4f306750e0be','2023-06-13 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$/s6AZTvD41WfoKQIvv9VcptdCPP1umzgMCDZyyJRyoHXKqEwh2v2Y','user','ak_e0b9fb5738a97612','2023-07-17 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$nuUaZ5pRF4bLCPj6L62UX/Opn7kVj3z0ZE4n6UssRKBRqIVbsQgm/','user','ak_20429b31c036e230','2023-01-24 10:00: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=29066;

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


