feat: new generic and unified banner system (poc) - #72
Open
Js41637 wants to merge 1 commit into
Open
Conversation
Js41637
force-pushed
the
feat/new-banner-system
branch
from
July 7, 2025 00:33
49b3cb8 to
e0dee15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Possible idea for a more generic banner config system that can support all games.
This doesn't change any of the existing banner logic or change the current logic in the import code and stuff. That still uses the current tables. If we do want to use this that will need to change but I figure it would be better try and get these changes in first so we can configure all the banners first, and then I can go in and update the existing logic to use the new banner system.
5_starand4_starnaming might not always make sense such as Zenless using the terms S Rank/A Rank, however I think it's just the simplest terminology to use. e.g. in the case of Zenless5_starwould be for S Rank characters.I don't know if those weird sqlx json query cache things are needed, I don't know how to make those.
Overview of columns
id: interger, automatically generated id of the banner and the primary keygame_id: an id used to tell the games apart (1 = HSR, 2 = ZZZ, 3 = Genshin)gacha_type: the banners gacha type (1 = hsr standard, 11 = hsr lightcone, 1001 = zzz standard, etc.) which can let you easily filter banners of a certain type (per game)banner_id: the unique id of the banner, HSR and Zenless both have distinct banner ids that the hoyo apis return which can be used to easily link pulls to banners. Genshin does not support this.version: the version the banner was added in, not really needed but convenient to havetitle: The 'official' name of the bannerinternal_name: a more simple name just for internal use as the official names can be kind of confusingrate_up_5_stars: array of item ids (can be character or weapon)rate_up_4_stars: array of item ids (can be character or weapon)start_time: the start time of the banner (has no timezone)end_time: the start time of the banner (has no timezone)timezone_dependant: whether the start/end times are timezone dependant, if it is then the time should be read as UTC+0, if it isn't, then the time needs to be read in the servers region (asia/eu/us)disabled: way to disable or turn it off if needed, not really needed but convenient to havecreated_at: when the entry was created, not really needed but convenient to have