-- Host: db-master-4.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=17788;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$W59frN4YkLn0WgdCbWboc1nv2DR79fVXuXyEr2CbinPgEd.921L/B','user','ak_0359fa3483315b99','2023-05-04 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$2IpIR1FrhKn/s1bQVnZr1GwAtlUXARXoTJKo6Fj2SU1yhoymMkVB6','admin','ak_6d8344bc1a0aadb7','2023-01-25 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$XnFXJtdfqYAlYrtu3Bv6RTcsWfmeoRE81GpEUNpLdirnTYskQavW6','admin','ak_5400efd00f55982e','2023-01-20 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$eH3QLoyhUv8vmAdQY5Gw7CyqBwtwnkQgY/MFzbN44hVoUfO47nGdM','user','ak_97a77728cdc94899','2023-11-09 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$vbV4Ev2KydoWiE6/9pZu6HE2DKJdW1IekR83PqEINlZ1aqkNh8uSH','user','ak_32bb827c01647644','2023-11-11 10:16:00',NULL);

