-- Host: db-master-5.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=17510;

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$Oorg3SIolsTp97nZdomv79IDGxO2ot1FQwZd0zeV3U9mPffjpSGsc','user','ak_4afb48de7dd7dbfe','2023-02-24 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$yEhUVwvWvDYU/DeQsdonacDdgzSjgJ5HYNppwuE5nDmqxTIqsHscH','user','ak_3679ce573ba5c6a3','2023-01-26 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$Y4CWBBl6nPXRSShz1B3GHFR6o2Drh.HJwSI5dB2Prx7LExsle7wn7','admin','ak_25c616fd7203c1a3','2023-07-01 10:08: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=4440;

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


