-- Host: db-master-8.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=34912;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$RETHLGX7/c6UO5qR7h6/PK3OXSDGnsvvzwdpuzCvd6LG1klSOdxZ6','user','ak_235ab6f93d9d903c','2023-11-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$KniopTyilH4X1gM4dUg1.d0/TbkQn88w3VHauM8falyZedv14aBhB','user','ak_56a2549ec09ae802','2023-02-04 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$SVuDa/Emzz/VyuvP/.6eBSnsX8y1Ko7Txjhrx2PiqKXR1KCAdwky/','user','ak_8b5463724cfc14a0','2023-10-16 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$UQsahU4Hx/nuVTqAzaLhrRrnxBA6oqgmf8C/HFzQ76zC1UmdoHsb0','user','ak_0d5558b947e7b905','2023-06-18 10:07:00',NULL);

