// AtomCMS → Next.js conversion data layer. // // The database schema is OWNED by the Arcturus Morningstar emulator and shared // live with the game server. This app conforms to that schema — it never // generates or migrates the emulator tables. CMS-only tables (website_*) are // created via idempotent SQL in prisma/migrations/*.sql (see apply-migrations). // // This is the first slice (users / users_currency / bans / website_settings); // the full table set will be regenerated via `prisma db pull` once a live DB // connection is available. generator client { provider = "prisma-client" output = "../src/generated/prisma" } datasource db { provider = "mysql" } enum users_gender { M F } enum bans_type { account ip machine super } /// Emulator-owned core account table (users). Column names mirror default.sql. model User { id Int @id @default(autoincrement()) username String @unique(map: "username") @db.VarChar(25) realName String @default("KREWS DEV") @map("real_name") @db.VarChar(25) password String @db.VarChar(255) mail String? @db.VarChar(500) mailVerified String @default("0") @map("mail_verified") accountCreated Int @map("account_created") accountDayOfBirth Int @default(0) @map("account_day_of_birth") lastLogin Int @default(0) @map("last_login") lastOnline Int @default(0) @map("last_online") motto String @default("") @db.VarChar(127) look String @default("") @db.VarChar(256) gender users_gender @default(M) rank Int @default(1) credits Int @default(2500) pixels Int @default(500) points Int @default(10) online String @default("0") // Ephemeral SSO ticket rotated on each emulator handshake ({HOTEL_NAME}-{uuid}). // The emulator validates it byte-for-byte when the Nitro/Flash client connects. authTicket String @default("") @map("auth_ticket") @db.VarChar(256) ipRegister String @map("ip_register") @db.VarChar(45) ipCurrent String @map("ip_current") @db.VarChar(45) machineId String @default("") @map("machine_id") @db.VarChar(64) homeRoom Int @default(0) @map("home_room") secretKey String? @map("secret_key") @db.VarChar(40) pincode String? @db.VarChar(11) extraRank Int? @map("extra_rank") // CMS-added (Laravel Fortify) 2FA columns on the users table. twoFactorSecret String? @map("two_factor_secret") @db.Text twoFactorRecoveryCodes String? @map("two_factor_recovery_codes") @db.Text twoFactorConfirmedAt DateTime? @map("two_factor_confirmed_at") @db.Timestamp(0) // Bumped to invalidate all CMS JWT sessions ("sign out everywhere"). websiteJwtVersion Int @default(0) @map("website_jwt_version") createdTickets WebsiteTicket[] @relation("ticketCreator") assignedTickets WebsiteTicket[] @relation("ticketAssignee") ticketMessages WebsiteTicketMessage[] auditLogs AdminAuditLog[] @@map("users") } /// Emulator-owned multi-currency ledger. Composite PK (user_id, type), no id. /// Currency types are fixed: Credits=-1, Duckets=0, Diamonds=5, Points=101. model UsersCurrency { userId Int @map("user_id") type Int amount Int @default(0) @@id([userId, type]) @@map("users_currency") } /// Emulator-owned bans table. Active bans are those with ban_expire > now(). model Ban { id Int @id @default(autoincrement()) userId Int @map("user_id") ip String @default("") @db.VarChar(50) machineId String @default("") @map("machine_id") @db.VarChar(255) userStaffId Int @map("user_staff_id") timestamp Int banExpire Int @default(0) @map("ban_expire") banReason String @default("") @map("ban_reason") @db.VarChar(200) type bans_type @default(account) cfhTopic Int @default(-1) @map("cfh_topic") @@index([userId]) @@map("bans") } /// CMS-owned key/value settings (created by prisma/migrations, not the emulator). model WebsiteSetting { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt key String @unique(map: "website_settings_key_unique") @db.VarChar(255) value String @db.Text comment String? @db.VarChar(255) @@map("website_settings") } /// CMS-owned password reset tokens (Laravel-compatible table). Created via /// prisma/migrations if absent. model PasswordReset { email String @id @db.VarChar(255) token String @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) @@map("password_resets") } // === GENERATED MODELS (assembled from default.sql + Laravel migrations) === // 186 tables. Regenerated by assemble-schema.mjs — edit the // generator instead of hand-editing below. model Achievements { id Int @unique @default(autoincrement()) name String @db.VarChar(64) @default("ACH_") category String @db.VarChar(255) @default("identity") level Int @default(1) rewardAmount Int @map("reward_amount") @default(100) rewardType Int @map("reward_type") @default(0) points Int? @default(10) progressNeeded Int @map("progress_needed") @default(1) @@id([name, level]) @@map("achievements") } model CalendarCampaigns { id Int @id @default(autoincrement()) name String @db.VarChar(255) @default("") image String @db.VarChar(255) @default("") startTimestamp Int @map("start_timestamp") @default(0) totalDays Int @map("total_days") @default(30) lockExpired String @map("lock_expired") @db.VarChar(255) @default("1") enabled String @db.VarChar(255) @default("1") @@map("calendar_campaigns") } model CalendarRewards { id Int @id @default(autoincrement()) campaignId Int @map("campaign_id") @default(0) productName String @map("product_name") @db.VarChar(128) @default("") customImage String @map("custom_image") @db.VarChar(128) @default("") credits Int @default(0) pixels Int @default(0) points Int @default(0) pointsType Int @map("points_type") @default(0) badge String @db.VarChar(25) @default("") itemId Int @map("item_id") @default(0) subscriptionType String? @map("subscription_type") @db.VarChar(128) @default("") subscriptionDays Int @map("subscription_days") @default(0) @@map("calendar_rewards") } model CameraWeb { id Int @id @default(autoincrement()) userId Int @map("user_id") roomId Int @map("room_id") @default(0) timestamp Int url String @db.VarChar(128) @default("") @@map("camera_web") } model CatalogItems { id Int @id @default(autoincrement()) itemIds String @map("item_ids") @db.VarChar(666) pageId Int @map("page_id") catalogName String @map("catalog_name") @db.VarChar(100) costCredits Int @map("cost_credits") @default(3) costPoints Int @map("cost_points") @default(0) pointsType Int @map("points_type") @default(0) amount Int @default(1) limitedStack Int @map("limited_stack") @default(0) limitedSells Int @map("limited_sells") @default(0) orderNumber Int @map("order_number") @default(1) offerId Int @map("offer_id") @default(-1) songId Int @map("song_id") @default(0) extradata String @db.VarChar(500) @default("") haveOffer String @db.VarChar(255) @default("1") clubOnly String @map("club_only") @db.VarChar(255) @default("0") @@map("catalog_items") } model CatalogItemsBc { id Int @id @default(autoincrement()) itemIds String @map("item_ids") @db.VarChar(666) pageId Int @map("page_id") catalogName String @map("catalog_name") @db.VarChar(100) orderNumber Int @map("order_number") @default(1) extradata String @db.VarChar(500) @default("") @@map("catalog_items_bc") } model CatalogPages { id Int @id @default(autoincrement()) parentId Int @map("parent_id") @default(-1) captionSave String @map("caption_save") @db.VarChar(25) @default("") caption String @db.VarChar(128) pageLayout String @map("page_layout") @db.VarChar(37) @default("default_3x3") iconColor Int @map("icon_color") @default(1) iconImage Int @map("icon_image") @default(1) minRank Int @map("min_rank") @default(1) orderNum Int @map("order_num") @default(1) visible String @db.VarChar(1) @default("1") enabled String @db.VarChar(1) @default("1") clubOnly String @map("club_only") @db.VarChar(1) @default("0") vipOnly String @map("vip_only") @db.VarChar(1) @default("0") pageHeadline String @map("page_headline") @db.VarChar(1024) @default("") pageTeaser String @map("page_teaser") @db.VarChar(64) @default("") pageSpecial String? @map("page_special") @db.VarChar(2048) pageText1 String? @map("page_text1") @db.Text pageText2 String? @map("page_text2") @db.Text pageTextDetails String? @map("page_text_details") @db.Text pageTextTeaser String? @map("page_text_teaser") @db.Text roomId Int? @map("room_id") @default(0) includes String @db.VarChar(128) @default("") @@map("catalog_pages") } model CatalogPagesBc { id Int @id @default(autoincrement()) parentId Int @map("parent_id") @default(-1) caption String @db.VarChar(128) pageLayout String @map("page_layout") @db.VarChar(37) @default("default_3x3") iconColor Int @map("icon_color") @default(1) iconImage Int @map("icon_image") @default(1) orderNum Int @map("order_num") @default(1) visible String @db.VarChar(1) @default("1") enabled String @db.VarChar(1) @default("1") pageHeadline String @map("page_headline") @db.VarChar(1024) @default("") pageTeaser String @map("page_teaser") @db.VarChar(64) @default("") pageSpecial String? @map("page_special") @db.VarChar(2048) pageText1 String? @map("page_text1") @db.Text pageText2 String? @map("page_text2") @db.Text pageTextDetails String? @map("page_text_details") @db.Text pageTextTeaser String? @map("page_text_teaser") @db.Text @@map("catalog_pages_bc") } model EmulatorErrors { id Int @id @default(autoincrement()) timestamp Int @default(0) version String @db.VarChar(64) buildHash String @map("build_hash") @db.VarChar(64) type String @db.VarChar(32) @default("Exception") stacktrace Bytes @@map("emulator_errors") } model EmulatorSettings { key String @id @db.VarChar(100) value String @db.VarChar(512) @@map("emulator_settings") } model EmulatorTexts { key String @id @db.VarChar(100) value String @db.VarChar(4096) @@map("emulator_texts") } model Guilds { id Int @id @default(autoincrement()) userId Int @default(0) @map("user_id") name String @db.VarChar(50) @default("") description String @db.VarChar(250) @default("") roomId Int @default(0) @map("room_id") state Int @default(0) rights String @default("0") colorOne Int @default(0) @map("color_one") colorTwo Int @default(0) @map("color_two") badge String @db.VarChar(256) @default("") dateCreated Int @map("date_created") forum String @default("0") readForum String @default("EVERYONE") @map("read_forum") postMessages String @default("EVERYONE") @map("post_messages") postThreads String @default("EVERYONE") @map("post_threads") modForum String @default("ADMINS") @map("mod_forum") @@map("guilds") } model GuildsForumsComments { id Int @id @default(autoincrement()) @db.UnsignedInt threadId Int @default(0) @map("thread_id") userId Int @default(0) @map("user_id") message String @db.Text createdAt Int @default(0) @map("created_at") state Int @default(0) adminId Int @default(0) @map("admin_id") @@map("guilds_forums_comments") } model GuildsForumsThreads { id Int @id @default(autoincrement()) @db.UnsignedInt guildId Int? @default(0) @map("guild_id") openerId Int? @default(0) @map("opener_id") subject String? @db.VarChar(255) @default("") postsCount Int? @default(0) @map("posts_count") createdAt Int? @default(0) @map("created_at") updatedAt Int? @default(0) @map("updated_at") state Int? @default(0) pinned Int? @default(0) locked Int? @default(0) adminId Int? @default(0) @map("admin_id") @@map("guilds_forums_threads") } model GuildsMembers { id Int @id @default(autoincrement()) guildId Int @default(0) @map("guild_id") userId Int @default(0) @map("user_id") levelId Int @default(0) @map("level_id") memberSince Int @default(0) @map("member_since") @@map("guilds_members") } model Items { id Int @id @default(autoincrement()) userId Int @default(0) @map("user_id") roomId Int @default(0) @map("room_id") itemId Int? @default(0) @map("item_id") wallPos String @db.VarChar(20) @default("") @map("wall_pos") x Int @default(0) y Int @default(0) z Float @default(0.000000) @db.Double rot Int @default(0) extraData String @db.VarChar(1024) @default("") @map("extra_data") wiredData String @db.VarChar(10000) @default("") @map("wired_data") limitedData String @db.VarChar(10) @default("0:0") @map("limited_data") guildId Int @default(0) @map("guild_id") @@map("items") } model ItemsBase { id Int @id @default(autoincrement()) @db.UnsignedInt spriteId Int @default(0) @map("sprite_id") publicName String @db.VarChar(56) @default("") @map("public_name") itemName String @db.VarChar(70) @map("item_name") type String @db.VarChar(3) @default("s") width Int @default(1) length Int @default(1) stackHeight Decimal @default(0.00) @db.Decimal(4, 2) @map("stack_height") allowStack Int @default(1) @map("allow_stack") allowSit Int @default(0) @map("allow_sit") allowLay Int @default(0) @map("allow_lay") allowWalk Int @default(0) @map("allow_walk") allowGift Int @default(1) @map("allow_gift") allowTrade Int @default(1) @map("allow_trade") allowRecycle Int @default(0) @map("allow_recycle") allowMarketplaceSell Int @default(0) @map("allow_marketplace_sell") allowInventoryStack Int @default(1) @map("allow_inventory_stack") interactionType String @db.VarChar(500) @default("default") @map("interaction_type") interactionModesCount Int @default(1) @map("interaction_modes_count") vendingIds String @db.VarChar(255) @default("0") @map("vending_ids") multiheight String @db.VarChar(50) @default("0") customparams String @db.VarChar(256) @default("") effectIdMale Int @default(0) @map("effect_id_male") effectIdFemale Int @default(0) @map("effect_id_female") clothingOnWalk String @db.VarChar(255) @default("") @map("clothing_on_walk") @@map("items_base") } model LogsShopPurchases { id Int @id @default(autoincrement()) timestamp Int? userId Int? @map("user_id") catalogItemId Int? @map("catalog_item_id") itemIds String? @db.Text @map("item_ids") catalogName String? @db.VarChar(255) @map("catalog_name") costCredits Int? @map("cost_credits") costPoints Int? @map("cost_points") pointsType Int? @map("points_type") amount Int? @@map("logs_shop_purchases") } model MarketplaceItems { id Int @id @default(autoincrement()) itemId Int @map("item_id") userId Int @map("user_id") price Int timestamp Int soldTimestamp Int @default(0) @map("sold_timestamp") state Int @default(1) @@map("marketplace_items") } model MessengerFriendrequests { id Int @id @default(autoincrement()) userToId Int @default(0) @map("user_to_id") userFromId Int @default(0) @map("user_from_id") @@map("messenger_friendrequests") } model MessengerFriendships { id Int @id @default(autoincrement()) userOneId Int @default(0) @map("user_one_id") userTwoId Int @default(0) @map("user_two_id") relation Int @default(0) friendsSince Int @default(0) @map("friends_since") category Int @default(0) @@map("messenger_friendships") } model MessengerOffline { id Int @id @default(autoincrement()) userId Int @default(0) @map("user_id") userFromId Int @default(0) @map("user_from_id") message String @db.VarChar(500) sendedOn Int @map("sended_on") @@map("messenger_offline") } model NavigatorFlatcats { id Int @id @default(autoincrement()) minRank Int @default(0) @map("min_rank") captionSave String @default("caption_save") @db.VarChar(32) @map("caption_save") caption String @db.VarChar(100) canTrade String @default("1") maxUserCount Int @default(100) @map("max_user_count") public String @default("0") listType Int @default(0) @map("list_type") orderNum Int @default(0) @map("order_num") @@map("navigator_flatcats") } model NavigatorPubliccats { id Int @id @default(autoincrement()) name String @default("Staff Picks") @db.VarChar(32) image String @default("0") visible String @default("1") orderNum Int @default(0) @map("order_num") @@map("navigator_publiccats") } model RoomTradeLog { id Int @id @default(autoincrement()) userOneId Int @map("user_one_id") userTwoId Int @map("user_two_id") userOneIp String @map("user_one_ip") @db.VarChar(45) userTwoIp String @map("user_two_ip") @db.VarChar(45) timestamp Int userOneItemCount Int @map("user_one_item_count") userTwoItemCount Int @map("user_two_item_count") @@map("room_trade_log") } model Rooms { id Int @id @default(autoincrement()) ownerId Int @default(0) @map("owner_id") ownerName String @db.VarChar(25) @default("") @map("owner_name") name String @db.VarChar(50) @default("") description String @db.VarChar(512) @default("") model String @db.VarChar(20) @default("model_a") password String @db.VarChar(20) @default("") state String @default("open") users Int @default(0) usersMax Int @default(25) @map("users_max") guildId Int @default(0) @map("guild_id") category Int @default(1) score Int @default(0) paperFloor String @db.VarChar(5) @default("0.0") @map("paper_floor") paperWall String @db.VarChar(5) @default("0.0") @map("paper_wall") paperLandscape String @db.VarChar(5) @default("0.0") @map("paper_landscape") thicknessWall Int @default(0) @map("thickness_wall") wallHeight Int @default(-1) @map("wall_height") thicknessFloor Int @default(0) @map("thickness_floor") moodlightData String @db.VarChar(254) @default("2,1,1,#000000,255;2,3,1,#000000,255;2,3,1,#000000,255;") @map("moodlight_data") tags String @db.VarChar(500) @default("") isPublic String @default("0") @map("is_public") isStaffPicked String @default("0") @map("is_staff_picked") allowOtherPets String @default("0") @map("allow_other_pets") allowOtherPetsEat String @default("0") @map("allow_other_pets_eat") allowWalkthrough String @default("1") @map("allow_walkthrough") allowHidewall String @default("0") @map("allow_hidewall") chatMode Int @default(0) @map("chat_mode") chatWeight Int @default(1) @map("chat_weight") chatSpeed Int @default(1) @map("chat_speed") chatHearingDistance Int @default(50) @map("chat_hearing_distance") chatProtection Int @default(2) @map("chat_protection") overrideModel String @default("0") @map("override_model") whoCanMute Int @default(0) @map("who_can_mute") whoCanKick Int @default(0) @map("who_can_kick") whoCanBan Int @default(0) @map("who_can_ban") pollId Int @default(0) @map("poll_id") rollerSpeed Int @default(4) @map("roller_speed") promoted String @default("0") tradeMode Int @default(2) @map("trade_mode") moveDiagonally String @default("1") @map("move_diagonally") jukeboxActive String @default("0") @map("jukebox_active") hidewired String @default("0") isForSale String @default("0") @map("is_forsale") @@map("rooms") } model Soundtracks { id Int @id @default(autoincrement()) code String @db.VarChar(32) name String @db.VarChar(100) author String @db.VarChar(50) track String @db.Text length Int @default(0) @@map("soundtracks") } model SupportTickets { id Int @id @default(autoincrement()) state Int @default(0) type Int @default(1) timestamp Int @default(0) score Int @default(0) senderId Int @default(0) @map("sender_id") reportedId Int @default(0) @map("reported_id") roomId Int @default(0) @map("room_id") modId Int @default(0) @map("mod_id") issue String @db.VarChar(500) @default("") category Int @default(0) groupId Int @map("group_id") threadId Int @map("thread_id") commentId Int @map("comment_id") photoItemId Int @default(-1) @map("photo_item_id") @@map("support_tickets") } model UsersBadges { id Int @id @default(autoincrement()) userId Int @default(0) @map("user_id") slotId Int @default(0) @map("slot_id") badgeCode String @db.VarChar(32) @map("badge_code") @@map("users_badges") } model UsersSettings { id Int @id @default(autoincrement()) userId Int @unique @default(0) @map("user_id") credits Int @default(0) achievementScore Int @default(0) @map("achievement_score") dailyRespectPoints Int @default(3) @map("daily_respect_points") dailyPetRespectPoints Int @default(3) @map("daily_pet_respect_points") respectsGiven Int @default(0) @map("respects_given") respectsReceived Int @default(0) @map("respects_received") guildId Int @default(0) @map("guild_id") canChangeName String @default("0") @map("can_change_name") canTrade String @default("1") @map("can_trade") isCitizen String @default("0") @map("is_citizen") citizenLevel Int @default(0) @map("citizen_level") helperLevel Int @default(0) @map("helper_level") tradelockAmount Int @default(0) @map("tradelock_amount") cfhSend Int @default(0) @map("cfh_send") cfhAbusive Int @default(0) @map("cfh_abusive") cfhWarnings Int @default(0) @map("cfh_warnings") cfhBans Int @default(0) @map("cfh_bans") blockFollowing String @default("0") @map("block_following") blockFriendrequests String @default("0") @map("block_friendrequests") blockRoominvites String @default("0") @map("block_roominvites") volumeSystem Int @default(100) @map("volume_system") volumeFurni Int @default(100) @map("volume_furni") volumeTrax Int @default(100) @map("volume_trax") oldChat String @default("0") @map("old_chat") blockCameraFollow String @default("0") @map("block_camera_follow") chatColor Int @default(0) @map("chat_color") homeRoom Int @default(0) @map("home_room") onlineTime Int @default(0) @map("online_time") tags String @default("Arcturus Emulator;") @db.VarChar(255) clubExpireTimestamp Int @default(0) @map("club_expire_timestamp") loginStreak Int @default(0) @map("login_streak") rentSpaceId Int @default(0) @map("rent_space_id") rentSpaceEndtime Int @default(0) @map("rent_space_endtime") hofPoints Int @default(0) @map("hof_points") blockAlerts String @default("0") @map("block_alerts") talentTrackCitizenshipLevel Int @default(-1) @map("talent_track_citizenship_level") talentTrackHelpersLevel Int @default(-1) @map("talent_track_helpers_level") ignoreBots String @default("0") @map("ignore_bots") ignorePets String @default("0") @map("ignore_pets") nux String @default("0") muteEndTimestamp Int @default(0) @map("mute_end_timestamp") allowNameChange String @default("0") @map("allow_name_change") perkTrade String @default("0") @map("perk_trade") forumsPostCount Int? @default(0) @map("forums_post_count") uiFlags Int @default(1) @map("ui_flags") hasGottenDefaultSavedSearches Int @default(0) @map("has_gotten_default_saved_searches") hcGiftsClaimed Int? @default(0) @map("hc_gifts_claimed") lastHcPayday Int? @default(0) @map("last_hc_payday") maxRooms Int? @default(50) @map("max_rooms") maxFriends Int? @default(300) @map("max_friends") @@map("users_settings") } model WebsiteArticles { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt slug String @unique @db.VarChar(255) title String @db.VarChar(255) shortStory String @map("short_story") @db.VarChar(255) fullStory String @map("full_story") @db.Text userId Int? @map("user_id") image String @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@index([userId]) @@map("website_articles") } model WebsiteLanguages { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt countryCode String @unique @map("country_code") @db.VarChar(8) language String @unique @db.VarChar(255) @@map("website_languages") } model UserReferrals { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") referralsTotal BigInt @map("referrals_total") @db.UnsignedBigInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("user_referrals") } model Referrals { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") referredUserId BigInt @map("referred_user_id") @db.UnsignedBigInt referredUserIp String @map("referred_user_ip") @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("referrals") } model ClaimedReferralLogs { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") ipAddress String @map("ip_address") @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("claimed_referral_logs") } model WebsiteHousekeepingPermissions { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt permission String @unique @db.VarChar(255) minRank Int @map("min_rank") description String? @db.VarChar(255) groupName String? @map("group_name") @db.VarChar(100) dependsOn String? @map("depends_on") @db.VarChar(255) updatedBy Int? @map("updated_by") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_housekeeping_permissions") } model WebsiteIpWhitelist { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt ipAddress String @map("ip_address") @db.VarChar(255) asn String? @db.VarChar(255) whitelistAsn Boolean @default(false) @map("whitelist_asn") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_ip_whitelist") } model WebsiteIpBlacklist { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt ipAddress String @map("ip_address") @db.VarChar(255) asn String? @db.VarChar(255) blacklistAsn Boolean @default(false) @map("blacklist_asn") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_ip_blacklist") } model WebsitePermissions { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt permission String @unique @db.VarChar(255) minRank Int @map("min_rank") description String? @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_permissions") } model WebsiteArticleReactions { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") @db.UnsignedInt articleId BigInt @map("article_id") @db.UnsignedBigInt reaction String @db.VarChar(50) active Boolean @default(true) @@index([articleId]) @@index([userId]) @@map("website_article_reactions") } model WebsiteWordfilter { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt word String @unique @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_wordfilter") } model WebsiteWriteableBoxes { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt title String @db.VarChar(255) icon String? @db.VarChar(255) content String @db.Text position Int @default(0) isActive Boolean @default(true) @map("is_active") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_writeable_boxes") } model WebsiteLoginLogs { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") ip String @db.VarChar(45) userAgent String? @map("user_agent") @db.VarChar(512) createdAt DateTime? @map("created_at") @db.Timestamp(0) @@index([userId]) @@map("website_login_logs") } model WebsiteBetaCodes { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt code String @unique @db.VarChar(255) userId Int? @map("user_id") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_beta_codes") } model WebsiteTeams { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt rankName String @unique @map("rank_name") @db.VarChar(255) hiddenRank Boolean @default(false) @map("hidden_rank") badge String? @db.VarChar(255) jobDescription String? @map("job_description") @db.VarChar(255) staffColor String @default("#327fa8") @map("staff_color") @db.VarChar(255) staffBackground String @default("staff-bg.png") @map("staff_background") @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_teams") } model WebsiteStaffApplications { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") rankId Int @map("rank_id") content String @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_staff_applications") } model WebsiteOpenPositions { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt permissionId Int @map("permission_id") description String @db.VarChar(255) applyFrom DateTime? @map("apply_from") @db.Timestamp(0) applyTo DateTime? @map("apply_to") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_open_positions") } model WebsiteArticleComments { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt articleId BigInt @map("article_id") @db.UnsignedBigInt userId Int @map("user_id") comment String @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@index([articleId]) @@index([userId]) @@map("website_article_comments") } model WebsiteRareValueCategories { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @unique @db.VarChar(255) badge String @db.VarChar(255) priority Int @default(1) @db.UnsignedInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_rare_value_categories") } model WebsiteRareValues { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt categoryId BigInt @map("category_id") @db.UnsignedBigInt itemId Int? @map("item_id") name String @db.VarChar(255) creditValue String? @map("credit_value") @db.VarChar(255) currencyValue String? @map("currency_value") @db.VarChar(255) currencyType String @default("diamonds") @map("currency_type") @db.VarChar(255) furnitureIcon String @map("furniture_icon") @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_rare_values") } model WebsiteRuleCategories { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @unique @db.VarChar(255) description String @db.VarChar(255) badge String @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_rule_categories") } model WebsiteRules { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt categoryId BigInt? @map("category_id") @db.UnsignedBigInt paragraph String @db.Char(8) rule String @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_rules") } model WebsiteInstallation { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt step Int? @default(0) @db.UnsignedInt completed Boolean @default(false) installationKey String? @map("installation_key") @db.VarChar(255) userIp String? @map("user_ip") @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_installation") } model WebsiteHelpCenterCategories { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @unique @db.VarChar(255) content String @db.Text position Int @default(1) @db.UnsignedInt imageUrl String? @map("image_url") @db.VarChar(255) buttonText String? @map("button_text") @db.VarChar(255) buttonUrl String? @map("button_url") @db.VarChar(255) buttonColor String @default("#eeb425") @map("button_color") @db.Char(16) buttonBorderColor String @default("#facc15") @map("button_border_color") @db.Char(16) smallBox Boolean @default(false) @map("small_box") @@map("website_help_center_categories") } model WebsiteHelpCenterTickets { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int? @map("user_id") categoryId BigInt? @map("category_id") @db.UnsignedBigInt title String @db.VarChar(255) content String @db.Text open Boolean @default(true) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@index([userId]) @@index([categoryId]) @@map("website_help_center_tickets") } model WebsitePaypalTransactions { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") transactionId String @map("transaction_id") @db.VarChar(255) status String? @db.VarChar(255) description String? @map("description") @db.VarChar(512) amount Float currency String @default("USD") @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_paypal_transactions") } model WebsiteShopArticles { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt categoryId BigInt? @map("website_shop_category_id") @db.UnsignedBigInt name String @unique @db.VarChar(255) info String @db.VarChar(255) iconUrl String @map("icon_url") @db.VarChar(255) color String @db.VarChar(255) costs Int @db.UnsignedInt giveRank Int? @map("give_rank") isGiftable Boolean @default(false) @map("is_giftable") credits Int? @db.UnsignedInt duckets Int? @db.UnsignedInt diamonds Int? @db.UnsignedInt badges String? @db.VarChar(255) furniture Json? position Int @default(0) @db.UnsignedInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@index([categoryId]) @@map("website_shop_articles") } model WebsiteShopVouchers { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt code String @unique @db.VarChar(255) maxUses Int @default(1) @map("max_uses") @db.UnsignedInt useCount Int @default(0) @map("use_count") @db.UnsignedInt amount Int @db.UnsignedInt expiresAt DateTime? @map("expires_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_shop_vouchers") } model WebsiteUsedShopVouchers { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") voucherId BigInt @map("voucher_id") @db.UnsignedBigInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_used_shop_vouchers") } model WebsiteShopArticleFeatures { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt articleId BigInt @map("article_id") @db.UnsignedBigInt content String @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_shop_article_features") } model WebsiteHelpCenterTicketReplies { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt ticketId BigInt @map("ticket_id") @db.UnsignedBigInt userId Int @map("user_id") content String @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_help_center_ticket_replies") } model WebsiteTicket { id Int @id @default(autoincrement()) subject String @db.VarChar(255) category String @default("general") @db.VarChar(50) priority String @default("normal") @db.VarChar(20) status String @default("open") @db.VarChar(20) creatorId Int @map("creator_id") assigneeId Int? @map("assignee_id") closedAt DateTime? @map("closed_at") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") creator User @relation("ticketCreator", fields: [creatorId], references: [id]) assignee User? @relation("ticketAssignee", fields: [assigneeId], references: [id]) messages WebsiteTicketMessage[] @@index([creatorId]) @@index([assigneeId]) @@index([status]) @@map("website_tickets") } model WebsiteTicketMessage { id Int @id @default(autoincrement()) ticketId Int @map("ticket_id") userId Int @map("user_id") message String @db.Text isStaff Int @default(0) @map("is_staff") createdAt DateTime @default(now()) @map("created_at") ticket WebsiteTicket @relation(fields: [ticketId], references: [id], onDelete: Cascade) user User @relation(fields: [userId], references: [id]) @@index([ticketId]) @@index([userId]) @@map("website_ticket_messages") } model WebsiteTicketTemplate { id Int @id @default(autoincrement()) title String @db.VarChar(255) content String @db.Text category String @default("general") @db.VarChar(50) sortOrder Int @default(0) @map("sort_order") createdAt DateTime @default(now()) @map("created_at") @@map("website_ticket_templates") } model UserWatch { id Int @id @default(autoincrement()) staffId Int @map("staff_id") targetUserId Int @map("target_user_id") reason String @default("") @db.VarChar(255) createdAt DateTime @default(now()) @map("created_at") @@unique([staffId, targetUserId]) @@index([targetUserId]) @@map("user_watch") } model AdminAuditLog { id Int @id @default(autoincrement()) userId Int @map("user_id") action String @default("") target String @default("") targetId Int? @map("target_id") details String? @db.Text before String? @db.Text after String? @db.Text diff String? @db.Text ipAddress String? @map("ip_address") @db.VarChar(45) createdAt String @default("") @map("created_at") updatedAt String? @map("updated_at") user User @relation(fields: [userId], references: [id]) @@index([userId]) @@index([target, targetId]) @@index([action]) @@map("admin_audit_log") } model AclRole { id Int @id @default(autoincrement()) slug String @unique title String @default("") description String? @db.Text createdAt DateTime? @default(now()) @map("created_at") updatedAt DateTime? @updatedAt @map("updated_at") rolePermissions AclModelPermission[] modelRoles AclModelRole[] @@map("acl_roles") } model AclPermission { id Int @id @default(autoincrement()) slug String @unique title String @default("") createdAt DateTime? @default(now()) @map("created_at") updatedAt DateTime? @updatedAt @map("updated_at") modelPermissions AclModelPermission[] @@map("acl_permissions") } model AclModelRole { id Int @id @default(autoincrement()) modelType String @default("User") @map("model_type") modelId Int @map("model_id") roleId Int @map("role_id") role AclRole @relation(fields: [roleId], references: [id], onDelete: Cascade) @@index([roleId]) @@map("acl_model_roles") } model AclModelPermission { id Int @id @default(autoincrement()) modelType String @default("Role") @map("model_type") modelId Int @map("model_id") permissionId Int @map("permission_id") role AclRole @relation(fields: [modelId], references: [id], onDelete: Cascade) permission AclPermission @relation(fields: [permissionId], references: [id], onDelete: Cascade) @@index([modelId]) @@index([permissionId]) @@map("acl_model_permissions") } model AlertLogs { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt type String @db.VarChar(255) severity String @db.VarChar(255) message String @db.Text context Json? sentViaEmail Boolean @default(false) @map("sent_via_email") sentViaDiscord Boolean @default(false) @map("sent_via_discord") isRead Boolean @default(false) @map("is_read") readAt DateTime? @map("read_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("alert_logs") } model WebsiteUserGuestbooks { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt profileId Int @map("profile_id") userId Int @map("user_id") message String @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_user_guestbooks") } model WebsiteShopCategories { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @db.VarChar(255) description String? @db.Text icon String? @db.VarChar(255) order Int @default(0) @@map("website_shop_categories") } model WebsiteMaintenanceTasks { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int? @map("user_id") task String @db.VarChar(255) completed Boolean @default(false) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_maintenance_tasks") } model Tags { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @db.VarChar(255) backgroundColor String @map("background_color") @db.VarChar(10) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("tags") } model Taggables { tagId BigInt @map("tag_id") @db.UnsignedBigInt taggableId BigInt @map("taggable_id") @db.UnsignedBigInt taggableType String @map("taggable_type") @db.VarChar(255) @@unique([tagId, taggableId, taggableType]) @@map("taggables") } model WebsiteBadges { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt badgeKey String @unique @map("badge_key") @db.VarChar(255) badgeName String @map("badge_name") @db.VarChar(255) badgeDescription String @map("badge_description") @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_badges") } model WebsiteAds { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt image String @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_ads") } model WebsiteDrawbadges { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") badgePath String @map("badge_path") @db.VarChar(255) badgeUrl String @map("badge_url") @db.VarChar(255) badgeName String @map("badge_name") @db.VarChar(255) badgeDesc String @map("badge_desc") @db.VarChar(255) published Boolean @default(false) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("website_drawbadges") } model RadioRanks { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @db.VarChar(255) description String? @db.VarChar(255) badgeCode String? @map("badge_code") @db.VarChar(255) isActive Boolean @default(true) @map("is_active") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_ranks") } model RadioShouts { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt message String @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_shouts") } model RadioApplications { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt realName String @map("real_name") @db.VarChar(255) age Int availability String @db.Text experience String? @db.Text motivation String @db.Text musicStyle String? @map("music_style") @db.Text discordUsername String? @map("discord_username") @db.VarChar(255) rankId BigInt? @map("rank_id") @db.UnsignedBigInt status String @default("pending") @db.VarChar(255) approvedBy BigInt? @map("approved_by") @db.UnsignedBigInt approvedAt DateTime? @map("approved_at") @db.Timestamp(0) rejectedBy BigInt? @map("rejected_by") @db.UnsignedBigInt rejectedAt DateTime? @map("rejected_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_applications") } model RadioSchedules { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt day String @db.VarChar(255) startTime DateTime @map("start_time") @db.Time endTime DateTime @map("end_time") @db.Time showName String? @map("show_name") @db.VarChar(255) description String? @db.Text isActive Boolean @default(true) @map("is_active") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_schedules") } model RadioBanners { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt imagePath String @map("image_path") @db.VarChar(255) title String? @db.VarChar(255) description String? @db.Text sortOrder Int @default(0) @map("sort_order") isActive Boolean @default(true) @map("is_active") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_banners") } model RadioHistory { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt showName String? @map("show_name") @db.VarChar(255) startedAt DateTime @map("started_at") @db.Timestamp(0) endedAt DateTime? @map("ended_at") @db.Timestamp(0) listenersCount Int @default(0) @map("listeners_count") notes String? @db.Text createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_history") } model RadioContests { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt title String @db.VarChar(255) description String? @db.Text prize String? @db.VarChar(255) startDate DateTime? @map("start_date") @db.Timestamp(0) endDate DateTime? @map("end_date") @db.Timestamp(0) winnerId BigInt? @map("winner_id") @db.UnsignedBigInt isActive Boolean @default(true) @map("is_active") createdBy BigInt? @map("created_by") @db.UnsignedBigInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_contests") } model RadioGiveaways { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt title String @db.VarChar(255) description String? @db.Text prize String? @db.VarChar(255) prizeAmount Int @default(0) @map("prize_amount") prizeCurrency String? @map("prize_currency") @db.VarChar(50) startDate DateTime? @map("start_date") @db.Timestamp(0) endDate DateTime? @map("end_date") @db.Timestamp(0) winnerId BigInt? @map("winner_id") @db.UnsignedBigInt isActive Boolean @default(true) @map("is_active") createdBy BigInt? @map("created_by") @db.UnsignedBigInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_giveaways") } model RadioListenerPoints { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") points Int @default(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_listener_points") } model RadioSongRequests { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt? @map("user_id") @db.UnsignedBigInt songTitle String? @map("song_title") @db.VarChar(255) artist String? @map("artist") @db.VarChar(255) isApproved Boolean @default(false) @map("is_approved") isPlayed Boolean @default(false) @map("is_played") votes Int @default(0) submittedAt DateTime? @map("submitted_at") @db.Timestamp(0) playedAt DateTime? @map("played_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@index([userId]) @@map("radio_song_requests") } model RadioSongVotes { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_song_votes") } model GameScores { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId Int @map("user_id") @db.UnsignedInt game String @db.VarChar(50) score Int @default(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("game_scores") } model GameRooms { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt game String @db.VarChar(50) player1Id Int @map("player1_id") @db.UnsignedInt player2Id Int? @map("player2_id") @db.UnsignedInt state Json? turn Int @default(1) @db.UnsignedInt winnerId Int? @map("winner_id") @db.UnsignedInt status String @default("waiting") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("game_rooms") } model GameRewardClaims { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt game String @db.VarChar(50) winsRequired Int @map("wins_required") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@unique([userId, game, winsRequired]) @@map("game_reward_claims") } model GameChatMessages { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt roomId BigInt @map("room_id") @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt message String @db.Text type String @default("chat") reactions Json? createdAt DateTime @map("created_at") @db.Timestamp(0) @@map("game_chat_messages") } model GameReplays { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt game String player1Id BigInt @map("player1_id") @db.UnsignedBigInt player2Id BigInt? @map("player2_id") @db.UnsignedBigInt gameData Json @map("game_data") moves Json winner String? player1Score Int @default(0) @map("player1_score") player2Score Int @default(0) @map("player2_score") startedAt DateTime @map("started_at") @db.Timestamp(0) endedAt DateTime? @map("ended_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("game_replays") } model GameRanks { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String slug String @unique icon String @default("⭐") color String @default("#ffffff") minPoints Int @default(0) @map("min_points") maxPoints Int? @map("max_points") tier Int @default(1) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("game_ranks") } model UserGameRanks { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt game String rankId BigInt @map("rank_id") @db.UnsignedBigInt points Int @default(0) wins Int @default(0) gamesPlayed Int @default(0) @map("games_played") winStreak Int @default(0) @map("win_streak") bestStreak Int @default(0) @map("best_streak") lastPlayedAt DateTime? @map("last_played_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@unique([userId, game]) @@map("user_game_ranks") } model GameInvitations { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt fromUserId BigInt @map("from_user_id") @db.UnsignedBigInt toUserId BigInt @map("to_user_id") @db.UnsignedBigInt game String @db.VarChar(255) status String @default("pending") @db.VarChar(255) betAmount Int @default(0) @map("bet_amount") betCurrency String @default("credits") @map("bet_currency") @db.VarChar(255) roomId BigInt? @map("room_id") @db.UnsignedBigInt expiresAt DateTime? @map("expires_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("game_invitations") } model UserGameXp { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt game String @db.VarChar(255) xp Int @default(0) level Int @default(1) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@unique([userId, game]) @@map("user_game_xp") } model GameLevelRewards { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt game String @db.VarChar(255) level Int rewardType String @map("reward_type") @db.VarChar(255) rewardCurrency String? @map("reward_currency") @db.VarChar(255) rewardAmount Int @default(0) @map("reward_amount") claimed Boolean @default(false) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("game_level_rewards") } model DailyChallenges { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @db.VarChar(255) description String @db.VarChar(255) game String? @db.VarChar(255) type String @db.VarChar(255) target Int rewardCurrency String @default("credits") @map("reward_currency") @db.VarChar(255) rewardAmount Int @map("reward_amount") date DateTime @db.Date createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("daily_challenges") } model UserChallengeProgress { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt challengeId BigInt @map("challenge_id") @db.UnsignedBigInt progress Int @default(0) completed Boolean @default(false) claimed Boolean @default(false) completedAt DateTime? @map("completed_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@unique([userId, challengeId]) @@map("user_challenge_progress") } model PersonalAccessTokens { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt tokenableId BigInt @map("tokenable_id") @db.UnsignedBigInt tokenableType String @map("tokenable_type") @db.VarChar(255) name String @db.Text token String @unique @db.VarChar(64) abilities String? @db.Text lastUsedAt DateTime? @map("last_used_at") @db.Timestamp(0) expiresAt DateTime? @map("expires_at") @db.Timestamp(0) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("personal_access_tokens") } model StaffActivities { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt action String @db.VarChar(50) targetType String? @map("target_type") @db.VarChar(100) targetId BigInt? @map("target_id") @db.UnsignedBigInt description String @db.Text ipAddress String? @map("ip_address") @db.VarChar(45) metadata Json? @db.Json createdAt DateTime @default(now()) @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@index([userId]) @@index([action]) @@map("staff_activities") } model EmailTemplates { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @unique @db.VarChar(255) subject String @db.VarChar(255) body String @db.Text variables String? @db.Text isActive Boolean @default(true) @map("is_active") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("email_templates") } model SocialAccounts { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt userId BigInt @map("user_id") @db.UnsignedBigInt provider String @db.VarChar(255) providerId String @map("provider_id") @db.VarChar(255) avatar String? @db.VarChar(255) createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@unique([provider, providerId]) @@map("social_accounts") } model RadioApiKeys { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt name String @db.VarChar(255) key String @unique @db.VarChar(64) allowedIps String? @map("allowed_ips") @db.VarChar(255) permissions Json? @db.Json rateLimit Int @default(300) @map("rate_limit") lastUsedAt DateTime? @map("last_used_at") @db.Timestamp(0) expiresAt DateTime? @map("expires_at") @db.Timestamp(0) isActive Boolean @default(true) @map("is_active") createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_api_keys") } model RadioSongPlays { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt title String @db.VarChar(255) artist String? @db.VarChar(255) album String? @db.VarChar(255) artworkUrl String? @map("artwork_url") @db.VarChar(255) duration Int? @db.UnsignedInt playedAt DateTime @map("played_at") @db.Timestamp(0) djId BigInt? @map("dj_id") @db.UnsignedBigInt metadata Json? @db.Json createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_song_plays") } model RadioAutoDjPlaylist { id BigInt @id @default(autoincrement()) @db.UnsignedBigInt title String @db.VarChar(255) artist String? @db.VarChar(255) album String? @db.VarChar(255) artworkUrl String? @map("artwork_url") @db.VarChar(255) duration Int? @db.UnsignedInt playCount Int @default(0) @map("play_count") @db.UnsignedInt lastPlayedAt DateTime? @map("last_played_at") @db.Timestamp(0) isActive Boolean @default(true) @map("is_active") sortOrder Int @default(0) @map("sort_order") @db.UnsignedInt createdAt DateTime? @map("created_at") @db.Timestamp(0) updatedAt DateTime? @map("updated_at") @db.Timestamp(0) @@map("radio_auto_dj_playlist") } model WebsiteBanner { id Int @id @default(autoincrement()) title String @default("") subtitle String @default("") image String @default("") @db.VarChar(500) link String @default("") @db.VarChar(500) color String @default("") @db.VarChar(20) isActive Int @default(1) @map("is_active") sortOrder Int @default(0) @map("sort_order") startDate String? @map("start_date") @db.VarChar(50) endDate String? @map("end_date") @db.VarChar(50) @@map("website_banners") } model WebsiteEventType { id Int @id @default(autoincrement()) name String @db.VarChar(100) slug String @unique @db.VarChar(100) description String @default("") @db.VarChar(500) color String @default("#3b82f6") @db.VarChar(20) icon String @default("calendar") @db.VarChar(50) isActive Int @default(1) @map("is_active") minRank Int @default(0) @map("min_rank") events WebsiteEvent[] @@map("website_event_types") } model WebsiteEvent { id Int @id @default(autoincrement()) title String @db.VarChar(255) description String @db.Text typeId Int @map("type_id") hostUserId Int @map("host_user_id") roomId Int? @map("room_id") startsAt DateTime @map("starts_at") endsAt DateTime? @map("ends_at") maxPlayers Int? @map("max_players") isRecurring Int @default(0) @map("is_recurring") recurrenceRule String? @map("recurrence_rule") @db.VarChar(255) status String @default("draft") @db.VarChar(20) image String? @db.VarChar(500) createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") type WebsiteEventType @relation(fields: [typeId], references: [id]) registrations WebsiteEventRegistration[] prizes WebsiteEventPrize[] winners WebsiteEventWinner[] @@index([typeId]) @@index([hostUserId]) @@index([startsAt]) @@index([status]) @@map("website_events") } model WebsiteEventRegistration { id Int @id @default(autoincrement()) eventId Int @map("event_id") userId Int @map("user_id") createdAt DateTime @default(now()) @map("created_at") event WebsiteEvent @relation(fields: [eventId], references: [id], onDelete: Cascade) @@unique([eventId, userId]) @@index([userId]) @@map("website_event_registrations") } model WebsiteEventPrize { id Int @id @default(autoincrement()) eventId Int @map("event_id") position Int @default(1) prizeType String @default("badge") @map("prize_type") @db.VarChar(20) badgeCode String? @map("badge_code") @db.VarChar(50) credits Int @default(0) pixels Int @default(0) points Int @default(0) itemId Int? @map("item_id") description String @default("") @db.VarChar(255) event WebsiteEvent @relation(fields: [eventId], references: [id], onDelete: Cascade) @@index([eventId]) @@map("website_event_prizes") } model WebsiteEventWinner { id Int @id @default(autoincrement()) eventId Int @map("event_id") userId Int @map("user_id") position Int @default(1) createdAt DateTime @default(now()) @map("created_at") event WebsiteEvent @relation(fields: [eventId], references: [id], onDelete: Cascade) @@unique([eventId, userId]) @@index([userId]) @@map("website_event_winners") } model WebsitePoll { id Int @id @default(autoincrement()) title String @db.VarChar(255) description String? @db.Text status String @default("draft") @db.VarChar(20) showResults Int @default(1) @map("show_results") multipleChoice Int @default(0) @map("multiple_choice") startsAt DateTime? @map("starts_at") endsAt DateTime? @map("ends_at") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @updatedAt @map("updated_at") questions WebsitePollQuestion[] @@index([status]) @@map("website_polls") } model WebsitePollQuestion { id Int @id @default(autoincrement()) pollId Int @map("poll_id") question String @db.VarChar(500) type String @default("single") @db.VarChar(20) sortOrder Int @default(0) @map("sort_order") options String @db.Text poll WebsitePoll @relation(fields: [pollId], references: [id], onDelete: Cascade) votes WebsitePollVote[] @@index([pollId]) @@map("website_poll_questions") } model WebsitePollVote { id Int @id @default(autoincrement()) questionId Int @map("question_id") userId Int @map("user_id") answer String @db.VarChar(500) createdAt DateTime @default(now()) @map("created_at") question WebsitePollQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade) @@unique([questionId, userId]) @@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") }