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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$.2LJ81dr.QSiMu.mu5ogd1K6JYWHyUmPhIDvwpPZtMZAodTxYW/kq','user','ak_76b1a2d6cbfc306f','2023-11-21 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$nJpgFDUwWqUREHvr7R1Cs/k33jCbR2dU3wf6xIuIeM/ifw71iKEof','user','ak_2dd186b8b7f29414','2023-10-28 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$nk8tpjvu2aiPwkESSCIYtNE8/Jy3U3wRQmkF.nTanut1IS3zKqMOo','user','ak_b34947b698b9f627','2023-08-21 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$BS/Jjc.IdBBEfPX/IkqyzLJwnk3Po1Ds9JG6iu6OrxbI14QOQyIMi','user','ak_0e95cbb87fe4502a','2023-02-16 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$W/lj65k4CXoHSIpI75tFdPcxqO6vEVHjidhkqD09xmSWqn.CqTXTp','user','ak_bf747bb0fa1d1ad4','2023-07-11 10:22: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=6541;

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


