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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$xWIhdwouc.1NUY0Ydupsem4eyoBuocT1Vc0dpOYGZsg414u7t7w46','admin','ak_e9f0657cbeb83496','2023-03-12 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$u8hNZ2aruBY11s//xYEqu9XxANFCzt2TdkCpE6mWUNHrDU8GAUvVK','user','ak_c0a77cc04f60ee62','2023-04-06 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$BqU5/Y1c5/ke0X2NLUvcb7sn5uz.isUKy11ttjvRlYRJvXF1gpFzh','user','ak_c3321ecdc4950e3d','2023-02-13 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$N6WpCgDvznK9BsPRn7w4gA4i2XvP2wnUGXj0sDkVHTmZ4U.rj0baT','user','ak_8d80722da2d16adc','2023-04-27 10:03:00',NULL);

