From 04b9844f0f75c34a646e1e5afda7f2e466e67b96 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 25 Jul 2026 17:55:30 +0200 Subject: [PATCH] fix: restore 53 prisma models referenced in code (incorrectly removed in cleanup) --- prisma/schema.prisma | 611 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 611 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 769015a7..770cf79b 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1844,3 +1844,614 @@ model WebsitePollVote { @@index([userId]) @@map("website_poll_votes") } +model AchievementsTalents { + id Int @id @default(autoincrement()) + type String @db.VarChar(255) @default("citizenship") + level Int @default(0) + achievementIds String @map("achievement_ids") @db.VarChar(100) @default("") + achievementLevels String @map("achievement_levels") @db.VarChar(100) @default("") + rewardFurni String @map("reward_furni") @db.VarChar(100) @default("") + rewardPerks String @map("reward_perks") @db.VarChar(100) @default("") + rewardBadges String @map("reward_badges") @db.VarChar(100) @default("") + + @@map("achievements_talents") +} + +model Bots { + id Int @id @default(autoincrement()) + userId Int @map("user_id") @default(0) + roomId Int @map("room_id") @default(0) + name String @db.VarChar(25) @default("") + motto String @db.VarChar(100) @default("") + figure String @db.VarChar(500) @default("") + gender String @db.VarChar(255) @default("M") + x Int @default(0) + y Int @default(0) + z Float @db.Double @default(0.0) + rot Int @default(0) + chatLines String @map("chat_lines") @db.VarChar(5112) @default("") + chatAuto String @map("chat_auto") @db.VarChar(255) @default("1") + chatRandom String @map("chat_random") @db.VarChar(255) @default("1") + chatDelay Int @map("chat_delay") @default(5) + dance Int @default(0) + freeroam String @db.VarChar(255) @default("0") + type String @db.VarChar(255) @default("generic") + effect Int @default(0) + bubbleId Int? @map("bubble_id") @default(31) + + @@map("bots") +} + +model CatalogClothing { + id Int @id @default(autoincrement()) + name String @db.VarChar(75) + setid String @db.VarChar(75) + + @@map("catalog_clothing") +} + +model CatalogClubOffers { + id Int @id + enabled String @db.VarChar(255) @default("1") + name String @db.VarChar(35) + days Int + credits Int @default(10) + points Int @default(0) + pointsType Int @map("points_type") @default(0) + type String @db.VarChar(255) @default("HC") + deal String @db.VarChar(255) @default("0") + giftable String @db.VarChar(255) @default("0") + + @@map("catalog_club_offers") +} + +model CatalogFeaturedPages { + slotId Int @id @map("slot_id") + image String @db.VarChar(70) @default("") + caption String @db.VarChar(130) @default("") + type String @db.VarChar(255) @default("page_name") + expireTimestamp Int @map("expire_timestamp") @default(-1) + pageName String @map("page_name") @db.VarChar(30) @default("") + pageId Int @map("page_id") @default(0) + productName String @map("product_name") @db.VarChar(40) @default("") + + @@map("catalog_featured_pages") +} + +model CatalogItemsLimited { + catalogItemId Int @map("catalog_item_id") + number Int + userId Int @map("user_id") @default(0) + timestamp Int @default(0) + itemId Int @map("item_id") @default(0) + + @@unique([catalogItemId, number], map: "catalog_item_id") + @@map("catalog_items_limited") +} + +model CatalogTargetOffers { + id Int @id @default(autoincrement()) + offerCode String @map("offer_code") @db.VarChar(32) + title String @db.VarChar(128) @default("") + description String @db.VarChar(2048) @default("") + image String @db.VarChar(128) + icon String @db.VarChar(128) + endTimestamp Int @map("end_timestamp") + credits Int @default(10) + points Int @default(10) + pointsType Int @map("points_type") @default(5) + purchaseLimit Int @map("purchase_limit") @default(5) + catalogItem Int @map("catalog_item") + vars String @db.VarChar(1024) @default("") + + @@map("catalog_target_offers") +} + +model ChatlogsPrivate { + id Int @id @default(autoincrement()) + userFromId Int @map("user_from_id") + userToId Int @map("user_to_id") + message String @db.VarChar(255) + timestamp Int @default(0) + + @@map("chatlogs_private") +} + +model CraftingAltarsRecipes { + altarId Int @map("altar_id") + recipeId Int @map("recipe_id") + + @@unique([altarId, recipeId], map: "altar_id") + @@map("crafting_altars_recipes") +} + +model CraftingRecipes { + id Int @id + productName String @map("product_name") @db.VarChar(64) + reward Int + enabled String @db.VarChar(1) @default("1") + achievement String @db.VarChar(255) @default("") + secret String @db.VarChar(1) @default("0") + limited String @db.VarChar(1) @default("0") + remaining Int @default(0) + + @@unique([productName], map: "name") + @@map("crafting_recipes") +} + +model GiftWrappers { + id Int @id @default(autoincrement()) + spriteId Int @map("sprite_id") + itemId Int @map("item_id") + type String @default("wrapper") + + @@map("gift_wrappers") +} + +model GroupsItems { + type String @map("type") + id Int @map("id") + firstvalue String @db.VarChar(255) + secondvalue String @db.VarChar(2000) + enabled String @default("1") + + @@id([id, type]) + @@map("groups_items") +} + +model GuildForumViews { + id Int @id @default(autoincrement()) + userId Int @map("user_id") + guildId Int @map("guild_id") + timestamp Int + + @@map("guild_forum_views") +} + +model GuildsElements { + id Int @map("id") + firstvalue String @db.VarChar(300) + secondvalue String @db.VarChar(300) + type String @db.VarChar(50) + enabled String @default("1") + + @@unique([id, type], map: "id") + @@map("guilds_elements") +} + +model HotelviewNews { + id Int @id @default(autoincrement()) + title String @db.VarChar(100) + text String @db.VarChar(500) + buttonText String @db.VarChar(50) @map("button_text") + buttonType String @default("web") @map("button_type") + buttonLink String @db.VarChar(200) @map("button_link") + image String @db.VarChar(200) + + @@map("hotelview_news") +} + +model ItemsCrackable { + itemId Int @id @map("item_id") + itemName String @db.VarChar(255) @map("item_name") + count Int + prizes String @db.VarChar(255) @default("179:1") + achievementTick String @db.VarChar(64) @map("achievement_tick") + achievementCracked String @db.VarChar(64) @map("achievement_cracked") + requiredEffect Int @default(0) @map("required_effect") + subscriptionDuration Int? @map("subscription_duration") + subscriptionType String? @db.VarChar(255) @map("subscription_type") + + @@map("items_crackable") +} + +model ItemsHighscoreData { + id Int @id @default(autoincrement()) + itemId Int @map("item_id") + userIds String @db.VarChar(500) @map("user_ids") + score Int + isWin Int? @default(0) @map("is_win") + timestamp Int + + @@map("items_highscore_data") +} + +model LogsHcPayday { + id Int @id @default(autoincrement()) + timestamp Int? + userId Int? @map("user_id") + hcStreak Int? @map("hc_streak") + totalCoinsSpent Int? @map("total_coins_spent") + rewardCoinsSpent Int? @map("reward_coins_spent") + rewardStreak Int? @map("reward_streak") + totalPayout Int? @map("total_payout") + currency String? @db.VarChar(255) + claimed Int? @default(0) + + @@map("logs_hc_payday") +} + +model MessengerCategories { + id Int @id @default(autoincrement()) + name String @db.VarChar(25) + userId Int @map("user_id") + + @@map("messenger_categories") +} + +model NavigatorFilter { + key String @id @db.VarChar(11) + field String @db.VarChar(32) + compare String + databaseQuery String @db.VarChar(1024) @map("database_query") + + @@map("navigator_filter") +} + +model NuxGifts { + id Int @id @default(autoincrement()) + type String @default("item") + value String @db.VarChar(32) + image String @db.VarChar(256) + + @@map("nux_gifts") +} + +model OldGuildsForums { + id Int @id @default(autoincrement()) + guildId Int @map("guild_id") + userId Int @map("user_id") + subject String @db.MediumText + message String @db.LongText + state String @default("OPEN") + adminId Int @default(0) @map("admin_id") + pinned String @default("0") + locked String @default("0") + timestamp Int + + @@map("old_guilds_forums") +} + +model OldGuildsForumsComments { + id Int @id @default(autoincrement()) + threadId Int @map("thread_id") + userId Int @map("user_id") + timestamp Int + message String @db.LongText + state String @default("OPEN") + adminId Int @default(0) @map("admin_id") + + @@map("old_guilds_forums_comments") +} + +model PetActions { + id Int @id @default(autoincrement()) @map("ID") + petType Int @map("pet_type") + petName String @db.VarChar(32) @map("pet_name") + offspringType Int @default(-1) @map("offspring_type") + happyActions String @default("") @db.VarChar(100) @map("happy_actions") + tiredActions String @default("") @db.VarChar(100) @map("tired_actions") + randomActions String @default("") @db.VarChar(100) @map("random_actions") + canSwim String? @default("0") @map("can_swim") + + @@map("pet_actions") +} + +model PetBreeds { + race Int @map("race") + colorOne Int @map("color_one") + colorTwo Int @map("color_two") + hasColorOne String @default("0") @map("has_color_one") + hasColorTwo String @default("0") @map("has_color_two") + + @@unique([race, colorOne, colorTwo, hasColorOne, hasColorTwo], map: "idx_name") + @@map("pet_breeds") +} + +model PetCommandsData { + commandId Int @id @map("command_id") + text String @db.VarChar(15) + requiredLevel Int @map("required_level") + rewardXp Int @default(5) @map("reward_xp") + costHappyness Int @default(0) @map("cost_happyness") + costEnergy Int @default(0) @map("cost_energy") + + @@map("pet_commands_data") +} + +model Polls { + id Int @id @default(autoincrement()) + title String @default("Hey! We'd appreciate it if you could take some time to answer these questions. It will help improve our hotel.") @db.VarChar(255) + thanksMessage String @map("thanks_message") @db.VarChar(255) + rewardBadge String @default("") @map("reward_badge") @db.VarChar(10) + + @@map("polls") +} + +model PollsAnswers { + pollId Int @map("poll_id") + userId Int @map("user_id") + questionId Int @map("question_id") + answer String @db.VarChar(255) + + @@unique([pollId, userId, questionId], map: "unique_index") + @@map("polls_answers") +} + +model PollsQuestions { + id Int @id @default(autoincrement()) + parentId Int @default(0) @map("parent_id") + pollId Int @map("poll_id") + order Int + question String @db.VarChar(255) + type Int @default(2) + minSelections Int @default(1) @map("min_selections") + options String @db.VarChar(255) + + @@map("polls_questions") +} + +model RoomModels { + name String @id @db.VarChar(100) + doorX Int @map("door_x") + doorY Int @map("door_y") + doorDir Int @default(2) @map("door_dir") + heightmap String @db.Text + publicItems String @map("public_items") @db.Text + clubOnly String @default("0") @map("club_only") + + @@map("room_models") +} + +model RoomTradeLogItems { + id Int @map("id") + itemId Int @map("item_id") + userId Int @map("user_id") + + @@unique([id, itemId, userId], map: "id") + @@map("room_trade_log_items") +} + +model RoomWordfilter { + roomId Int @map("room_id") + word String @db.VarChar(25) + + @@unique([roomId, word], map: "unique_index") + @@map("room_wordfilter") +} + +model SanctionLevels { + level Int @id + type String + hourLength Int @map("hour_length") + probationDays Int @map("probation_days") + + @@map("sanction_levels") +} + +model Sanctions { + id Int @id @default(autoincrement()) + habboId Int @default(0) @map("habbo_id") + sanctionLevel Int @default(0) @map("sanction_level") + probationTimestamp Int @default(0) @map("probation_timestamp") + reason String @db.VarChar(255) @default("") @map("reason") + tradeLockedUntil Int @default(0) @map("trade_locked_until") + isMuted Int @default(0) @map("is_muted") + muteDuration Int @default(0) @map("mute_duration") + + @@map("sanctions") +} + +model SupportCfhCategories { + id Int @id @default(autoincrement()) + nameInternal String? @db.VarChar(255) @map("name_internal") + nameExternal String? @db.VarChar(255) @map("name_external") + + @@map("support_cfh_categories") +} + +model SupportCfhTopics { + id Int @id @default(autoincrement()) + categoryId Int? @map("category_id") + nameInternal String? @db.VarChar(255) @map("name_internal") + nameExternal String? @db.VarChar(255) @map("name_external") + action String? @default("mods") + ignoreTarget String @default("0") @map("ignore_target") + autoReply String? @db.Text @map("auto_reply") + defaultSanction Int @default(0) @map("default_sanction") + + @@map("support_cfh_topics") +} + +model SupportIssueCategories { + id Int @id @default(autoincrement()) + name String @db.VarChar(255) @default("PII") + + @@map("support_issue_categories") +} + +model SupportIssuePresets { + id Int @id @default(autoincrement()) + category Int @default(1) + name String @db.VarChar(100) @default("") @map("name") + message String @db.VarChar(300) @default("") + reminder String @db.VarChar(100) + banFor Int @default(0) @map("ban_for") + muteFor Int @default(0) @map("mute_for") + + @@map("support_issue_presets") +} + +model SupportPresets { + id Int @id @default(autoincrement()) + type String @default("user") + preset String @db.VarChar(200) + + @@map("support_presets") +} + +model UsersAchievements { + userId Int @map("user_id") + achievementName String @db.VarChar(255) @map("achievement_name") + progress Int @default(1) + + @@unique([userId, achievementName], map: "user_id") + @@map("users_achievements") +} + +model UsersAchievementsQueue { + userId Int @map("user_id") + achievementId Int @map("achievement_id") + amount Int + + @@unique([userId, achievementId], map: "unique_index") + @@map("users_achievements_queue") +} + +model UsersClothing { + userId Int @map("user_id") + clothingId Int @map("clothing_id") + + @@unique([userId, clothingId], map: "user_id") + @@map("users_clothing") +} + +model UsersEffects { + userId Int @map("user_id") + effect Int + duration Int @default(86400) + activationTimestamp Int @default(-1) @map("activation_timestamp") + total Int @default(1) + + @@unique([userId, effect], map: "user_id") + @@map("users_effects") +} + +model UsersFavoriteRooms { + userId Int @map("user_id") + roomId Int @map("room_id") + + @@unique([userId, roomId], map: "user_id") + @@map("users_favorite_rooms") +} + +model UsersPets { + id Int @id @default(autoincrement()) + userId Int @map("user_id") + roomId Int @map("room_id") + name String @default("User Pet") @db.VarChar(15) + race Int + type Int + color String @db.VarChar(6) + happyness Int @default(100) + experience Int @default(0) + energy Int @default(100) + hunger Int @default(0) + thirst Int @default(0) + respect Int @default(0) + created Int + x Int @default(0) + y Int @default(0) + z Float @default(0) + rot Int @default(0) + hairStyle Int @default(-1) @map("hair_style") + hairColor Int @default(0) @map("hair_color") + saddle String @default("0") + ride String @default("0") + mpType Int @default(0) @map("mp_type") + mpColor Int @default(0) @map("mp_color") + mpNose Int @default(0) @map("mp_nose") + mpNoseColor Int @default(0) @map("mp_nose_color") + mpEyes Int @default(0) @map("mp_eyes") + mpEyesColor Int @default(0) @map("mp_eyes_color") + mpMouth Int @default(0) @map("mp_mouth") + mpMouthColor Int @default(0) @map("mp_mouth_color") + mpDeathTimestamp Int @default(0) @map("mp_death_timestamp") + mpBreedable String @default("0") @map("mp_breedable") + mpAllowBreed String @default("0") @map("mp_allow_breed") + gnomeData String @default("") @db.VarChar(80) @map("gnome_data") + mpIsDead Int @default(0) @map("mp_is_dead") + saddleItemId Int? @map("saddle_item_id") + + @@map("users_pets") +} + +model UsersRecipes { + userId Int @map("user_id") + recipe Int + + @@unique([userId, recipe], map: "user_id") + @@map("users_recipes") +} + +model UsersSavedSearches { + id Int @id @default(autoincrement()) + searchCode String @db.VarChar(255) @map("search_code") + filter String? @db.VarChar(255) + userId Int @map("user_id") + + @@map("users_saved_searches") +} + +model UsersSubscriptions { + id Int @id @default(autoincrement()) @db.UnsignedInt + userId Int? @db.UnsignedInt @map("user_id") + subscriptionType String? @db.VarChar(255) @map("subscription_type") + timestampStart Int? @db.UnsignedInt @map("timestamp_start") + duration Int? @db.UnsignedInt + active Int? @default(1) + + @@map("users_subscriptions") +} + +model UsersTargetOfferPurchases { + userId Int @map("user_id") + offerId Int @map("offer_id") + state Int @default(0) + amount Int @default(0) + lastPurchase Int @default(0) @map("last_purchase") + + @@unique([userId, offerId], map: "use_id") + @@map("users_target_offer_purchases") +} + +model UsersWardrobe { + id Int @id @default(autoincrement()) + userId Int @default(0) @map("user_id") + slotId Int @default(0) @map("slot_id") + look String @db.VarChar(256) + gender String @default("F") + + @@map("users_wardrobe") +} + +model VoucherHistory { + id Int @id @default(autoincrement()) + voucherId Int @map("voucher_id") + userId Int @map("user_id") + timestamp Int + + @@map("voucher_history") +} + +model Vouchers { + id Int @id @default(autoincrement()) + code String @db.VarChar(10) + credits Int @default(0) + points Int @default(0) + pointsType Int @default(0) @map("points_type") + catalogItemId Int @default(0) @map("catalog_item_id") + amount Int @default(1) + limit Int @default(-1) + + @@map("vouchers") +} + +model YoutubePlaylists { + itemId Int @map("item_id") + playlistId String @db.VarChar(255) @map("playlist_id") + order Int + + @@unique([itemId, playlistId, order], map: "item_id") + @@map("youtube_playlists") +}