Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remodel DB with paid actions at center? #1717

Open
huumn opened this issue Dec 13, 2024 · 0 comments
Open

Remodel DB with paid actions at center? #1717

huumn opened this issue Dec 13, 2024 · 0 comments
Labels
question further information is required

Comments

@huumn
Copy link
Member

huumn commented Dec 13, 2024

As I'm working on satistics I'm realizing a lot of db model could use refactoring now that paid actions are pretty ubiquitous.

Something like a PaidAction table that's a parent of ItemAct, SubAct, etc. so it can include other things like buying CCs (needs its own special table otherwise), giving invite gifts (currently inferred), rewards, etc.

PaidAction {
    type
    state
    cost
    senderId
    receiverId
    paymentMethod
}

Then relevant rows in other tables (should they be needed) would belong to a PaidAction. This might make retries and other types of associations easier.

It's maybe not a high priority thing but it's longterm optimal afaict.

@huumn huumn added the question further information is required label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question further information is required
Projects
None yet
Development

No branches or pull requests

1 participant