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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$MF4npHKVAJpdlejeH5gCEuV.8L4hXlUUGh0wDgFFdyHGv5qbrGG5z','user','ak_0a133a165b107875','2023-09-06 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$jmeZzq5k4Scaiuv170dLTBacDPVAYJNp9TUe8hi9npUgm9rJNQ8GW','user','ak_a2ddfba9f5bb75d4','2023-08-13 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$SVJgwN7zxGPgoWE99mVsMElxZ705trZQ5tx2Ex1xxBBwmB2Jzup0M','user','ak_7e2aff7f42515e53','2023-11-26 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$INYuXOIfEUaLiHb80xGsf.nEvpjWi7Z7Ih9cklAujS7fkW.WChj/A','user','ak_bb4e0d8bcfc74f81','2023-12-25 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$UEAaOXwKtQRU0ojT2ArfU5JCbONlv0/72ROKsh31AIvsxRldNkIU1','admin','ak_8abfcb3c3bed3d09','2023-07-01 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$g2eBIzMLraQNku3BtDezTlQ7y60cGvkHTcwLPaMba4scKw5WP6XDB','admin','ak_a228d722834d5ae4','2023-02-20 10:12: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=39788;

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


