ToogaInc / ToogaBooga

An open-source Realm of the Mad God Discord chat bot designed for advanced cross-verification, moderation, and raid management.
MIT License
8 stars 4 forks source link

refactor(db): complete guild database restructure #235

Closed ewang2002 closed 1 year ago

ewang2002 commented 2 years ago

This PR will break the (giant) guild document interface, which represents the structure for the guild document, into multiple smaller guild documents.

Once we determine the best structure for the new guild documents, this PR will then work on refactoring the codebase to use the new structure.

ewang2002 commented 2 years ago

@nyapat so, for database restructuring, the interface representations I have in GuildDocumentInterfaces.ts are what I have in mind for the new representation of the guild documents.

Can you all quickly look over it and give me feedback on what should be changed before I commit to the restructure? Are any changes too excessive? Should I break some interfaces down even more? etc.

This is also a good opportunity to talk about how the main section should be restructured, if at all.

Note that, for the purpose of ensuring everything still compiles, I'm leaving the original interfaces -- I will eventually remove them.

ewang2002 commented 2 years ago

@dmansdman pinging you as well since you opened one of the issues.

nyapat commented 1 year ago

fwiw looks fine, please keep up the structure of extending a required info you'd need across all stuff; IQuotaInfo is currently annoying as it doesn't include guild id when quota is inherently restricted per guild

ewang2002 commented 1 year ago

fwiw looks fine, please keep up the structure of extending a required info you'd need across all stuff; IQuotaInfo is currently annoying as it doesn't include guild id when quota is inherently restricted per guild

Yeah, IQuotaInfo should extend the guild only (I think I did that at least). Then, you'll still have the array of quota information in each document.

ewang2002 commented 1 year ago

Closing this PR and creating a new one; this one is kind of a mess.