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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$eOvIvTqtHu55OXVHxU5oGl3EhXeq2UU2Fmb0gj0ztE0ery2pjTxsD','user','ak_ef8a59b4d2ae871e','2023-02-28 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$3MNR9yynOMuwXts4Ov1B2Z/1qhzISdXNQIEXYjK7AQt5p.AMiY92A','user','ak_da3ed1c02aebe2c7','2023-12-18 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$hoo5tGGDpZcrzuyY6U.CqjwxCJCy3dYXc2OBAxWPNjdq8CYM9Ef4q','user','ak_70b58194669241aa','2023-10-17 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$rUfAvOi2/5pZ4JYhArEEsHcT8vH4Tr8CiqGRceGzgoIwWIjY18ak/','user','ak_dd0b63d6eb01257e','2023-01-24 10:22:00',NULL);

