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

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$9.EDV.L6sfr9zDW/Hkd6/92pF6vUwN86eB/9B7sbSSc.GCy7R0IHP','admin','ak_2fb5b2114116e03f','2023-11-28 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$I7wAiBt.DLnugEEGOW0/Iy8qFB/htjDmiNFfZAqMu.TDMQ.SI/if6','admin','ak_492777964a8f7c1c','2023-08-14 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$hf2CzkIj7wTBJVTRd4fzzFlZI5hyJnG3hCOMuWz0FUmfxc2AgDTpA','user','ak_0e47d7905e28357f','2023-03-11 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$hS0zo2E.slAfxaSdf/O087NW39oXBEBPQfocfVbK4J105ux/ThV2A','user','ak_87b009f22bebcd94','2023-08-03 10:21:00',NULL);

