-- Host: db-master-0.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Orocoue.o8bsFIuLHFrnYu46mVW2QJ6yQuoXxxCxDy2aIRMSkIvZU','admin','ak_56ef434fe1659e54','2023-08-14 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$D3c6MFYmImx1eOcZs3sg/.J1w27GRkQdnuzg9M8wehZ4SKT7a1MAp','user','ak_4917d8109ca3300c','2023-04-18 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$1LBegs/a1HSIbVX3bbZlCNzb1XmPT3hQ5KkbQ9eoKFNiFB8q743wD','user','ak_ffbb16e0afa01dfc','2023-01-09 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$1tR1lrh5u0yP7.LVxI2sebmTynlG/H4/ZCPY56IlDtgTTUi7z/MyC','admin','ak_84f4c0af01487f5a','2023-05-21 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$vFmsWczaQjf9DhW7oQtcQw6CsYBhrVDD3Rem2mRD5mZc82.VGbhOn','admin','ak_57ed77b8e1284e10','2023-04-10 10:21: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=16347;

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


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

--
-- Dumping data for table `audit_log`
--


