-- Host: db-master-9.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$h2.P6LZ8uj/HrxQymISpJt85CnlMjjkFoaBvOiyJitFuqMhG53i8q','user','ak_6cbafbd1087da934','2023-06-14 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Jv7U5jkCq2pRV4E3BgMC1OblLiB20LfyEdjacBPu.YbbMozx2n1uP','user','ak_b2568d00bf135c58','2023-12-07 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$3.ys0iLxkhAeti1sHWiK4WsXgFmUMJkdi24H4sWLyzRNHcTw7/5Qf','user','ak_0f5fbf580934ad6f','2023-06-02 10:18:00',NULL);

