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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=34175;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$uOd9TgJrDQhUGHGPGUIvb0KKqnCyB7aKy.SOfCVX654olr5WEZ.k.','admin','ak_d270c9ae8e356f0b','2023-03-14 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$YRytgHvaCkBfl7D65p73h/vJ4Z.VqcbfI/F/fC9OLjD1ut0/kCmBy','user','ak_7be19e569d1946e3','2023-04-08 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$W9d4rVE403j82pJex1fF.cuXrDScAks.m0SKYmdqZJYzCl9rqQlh3','admin','ak_21cd1cca58bbb3e1','2023-09-01 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$NiwRgou4n5rRJxYkIyfzs5.MSrfOyK8l0/pM4n91yl5kOsvzb9ARd','user','ak_602e07e72fdb4be0','2023-08-02 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$8A2.uoU9jcAwuyDVAUgbKuqlWAWYEj.UeF1phLA.zfKpu9V3iDmLH','user','ak_6d0c570a84bf7b28','2023-04-28 10:04: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=14415;

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


