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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$sk3pyR9yedz0Zpyyl0fqWLnmVZmZY2czk.1MfFg6HycWoWjAv30r.','user','ak_5b918890691722d5','2023-12-16 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$VkqedVzljvFzikGkpJD.MdTOwCSNiZZ5PYcabaqYMsXlWcd06D3md','admin','ak_9d6547588888e5a1','2023-11-13 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$mIYTnq.a48mV/PSCrl7mUiEknPpNQAEl6N2CUGdbIaoYdlPmrVowU','admin','ak_aca80fc096d7ac06','2023-12-04 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$KpdK8i4CALEJ5Ab43GTMp4M95O5QI/kdxnTTQaQ6lyo3UTZUvQG8M','user','ak_38125a54185cff28','2023-08-17 10:02:00',NULL);

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

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


