-- Host: db-master-9.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=37127;

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$RTn4rAqFjV8ljVcF5zYg5NEPmCcrFC3tFbdowfdwR3dwKwMpzonjP','user','ak_248a3f2117cd0938','2023-09-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$U6XKd8b4afiQJ/WLYyI1z64tGb/2cnyHp70yKmHLCvPdS2zsfZnUO','admin','ak_3858772e28e4f951','2023-10-09 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$szp4zczq9Dym7jMgnZ6p.AUJN.acdpZe3LGqO0BoVxONGscBwX8Hl','user','ak_98e0ed172e4d8865','2023-11-16 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$wdh4Fe3zO2hktEL.Rz1HYo..lJUqEiDJYCHF.TUdiaNT7OLcg.J0t','user','ak_fcdad6c4a3d7f5e9','2023-12-21 10:18: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=41853;

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


