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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$x/LxNQiHiGHgnYxpL.L5zws0gmpowKaZjcCGq1Ry5e7TlsRJVPKEV','user','ak_5eef5478792dec42','2023-01-11 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$TH/HTqmlPoWqlEox0wKt6hZOUFxSBZPuBY3jf7U5AiobqAqo0U8co','user','ak_3b59f46c1c281afc','2023-03-01 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$.sSbvK49220QioKUvl70jDzjE2NR/mh0tqjUUO0GmWRuJ0QpN3Xwq','admin','ak_e072ac8403703cc5','2023-07-21 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$eYK5saxLLDYJbDkAeQZ2kVg8e5N6iMmgK7UdnYyYm6o35.WH2BR.l','user','ak_580ecebd70153a6c','2023-04-05 10:20:00',NULL);

