-- Snapshot generated at 2026-04-04T09:18:47+00:00
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

-- ----------------------------
-- Table structure for `graffiti_items`
-- ----------------------------
DROP TABLE IF EXISTS `graffiti_items`;
CREATE TABLE `graffiti_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `image_url` varchar(500) DEFAULT NULL,
  `artist` varchar(255) DEFAULT NULL,
  `crew` varchar(255) DEFAULT NULL,
  `year_text` varchar(100) DEFAULT NULL,
  `style` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved') DEFAULT 'approved',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of `graffiti_items`
-- ----------------------------
INSERT INTO `graffiti_items` (`id`, `name`, `description`, `image_url`, `artist`, `crew`, `year_text`, `style`, `status`, `created_at`, `updated_at`) VALUES ('15', 'Teszt', 'Ez egy teszt', '/uploads/tags/tag_69d019b999b478.32887073.png', '', '', '', '', 'approved', '2026-04-03 19:49:13', '2026-04-03 19:49:13');

-- ----------------------------
-- Table structure for `graffiti_locations`
-- ----------------------------
DROP TABLE IF EXISTS `graffiti_locations`;
CREATE TABLE `graffiti_locations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `graffiti_id` int(11) NOT NULL,
  `viewer_file` varchar(255) NOT NULL,
  `building_name` varchar(255) DEFAULT NULL,
  `location_label` varchar(255) DEFAULT NULL,
  `camera_x` decimal(10,2) NOT NULL,
  `camera_y` decimal(10,2) NOT NULL,
  `camera_z` decimal(10,2) NOT NULL,
  `target_x` decimal(10,2) NOT NULL,
  `target_y` decimal(10,2) NOT NULL,
  `target_z` decimal(10,2) NOT NULL,
  `trigger_distance` decimal(10,2) DEFAULT 5.00,
  `status` enum('pending','approved') DEFAULT 'approved',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `fk_graffiti_locations_item` (`graffiti_id`),
  CONSTRAINT `fk_graffiti_locations_item` FOREIGN KEY (`graffiti_id`) REFERENCES `graffiti_items` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of `graffiti_locations`
-- ----------------------------
INSERT INTO `graffiti_locations` (`id`, `graffiti_id`, `viewer_file`, `building_name`, `location_label`, `camera_x`, `camera_y`, `camera_z`, `target_x`, `target_y`, `target_z`, `trigger_distance`, `status`, `created_at`) VALUES ('15', '15', 'untitled.glb', 'Ganz Danubius', 'Ganz Danubius', '39.00', '0.85', '-17.13', '39.65', '1.48', '-14.27', '5.00', 'approved', '2026-04-03 19:49:13');

-- ----------------------------
-- Table structure for `photogrammetry_tag_links`
-- ----------------------------
DROP TABLE IF EXISTS `photogrammetry_tag_links`;
CREATE TABLE `photogrammetry_tag_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tag_id` int(11) NOT NULL,
  `label` varchar(255) DEFAULT NULL,
  `href` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tag_id` (`tag_id`),
  CONSTRAINT `photogrammetry_tag_links_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `photogrammetry_tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of `photogrammetry_tag_links`
-- ----------------------------
INSERT INTO `photogrammetry_tag_links` (`id`, `tag_id`, `label`, `href`) VALUES ('45', '35', 'Ganz Danubius', 'https://prokobboroka.com/viewer.html?viewer_file=untitled.glb&x=39.00&y=0.85&z=-17.13&tx=39.65&ty=1.48&tz=-14.27');

-- ----------------------------
-- Table structure for `photogrammetry_tags`
-- ----------------------------
DROP TABLE IF EXISTS `photogrammetry_tags`;
CREATE TABLE `photogrammetry_tags` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `image_url` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of `photogrammetry_tags`
-- ----------------------------
INSERT INTO `photogrammetry_tags` (`id`, `name`, `description`, `image_url`, `created_at`, `updated_at`) VALUES ('35', 'Teszt', 'Ez egy teszt', '/uploads/tags/tag_69d019b999b478.32887073.png', '2026-04-03 19:49:13', '2026-04-03 19:49:13');

-- ----------------------------
-- Table structure for `standalone_street_tags`
-- ----------------------------
DROP TABLE IF EXISTS `standalone_street_tags`;
CREATE TABLE `standalone_street_tags` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `image_url` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


-- ----------------------------
-- Table structure for `urbex_buildings`
-- ----------------------------
DROP TABLE IF EXISTS `urbex_buildings`;
CREATE TABLE `urbex_buildings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `lat` decimal(10,7) DEFAULT NULL,
  `lng` decimal(10,7) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `link_label` varchar(255) DEFAULT NULL,
  `link_href` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of `urbex_buildings`
-- ----------------------------
INSERT INTO `urbex_buildings` (`id`, `name`, `location`, `lat`, `lng`, `description`, `link_label`, `link_href`, `created_at`, `updated_at`) VALUES ('5', 'Ganz Danubius', '47.558525,19.071579', '47.5585250', '19.0715790', 'Ez egy gyár', 'View photgrammetry model', 'https://prokobboroka.com/viewer.html', '2026-04-04 09:02:08', '2026-04-04 09:02:08');

