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

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=14267;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$YUtF8uTGH8dzxzoi0qCuUunMalsqQKrM.ftPlU684f9DU6fbuvlBu','user','ak_63c70a6b0860b5f0','2023-07-14 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$3HN/NHOGY4ApS05XB7vF2lFLwQiu8rMq1pouUFb2fYmUj6L5OlXm6','admin','ak_85d1eb82c05953ce','2023-10-12 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$zAtQGrrHarKZDudg6NSd61Ktm.55ebriwf.b0UydYJ108UGnyOpbg','user','ak_4b93d1e2edf84b78','2023-07-02 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$.tTfC5haY5FRlWEsGiqDzL8H5Q9.95rwPrDob0XDfp1URSvcysYxD','user','ak_8060ae221b94dd67','2023-03-12 10:03:00',NULL);

