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

活动限定奖池 #837

Merged
merged 6 commits into from
Aug 31, 2024
Merged

Conversation

Deophius
Copy link
Collaborator

为奖池增加了一个可选的activity外键,如果非空,会在用户兑换前检查是否已参加这个活动。如果未参加,将拒绝用户的兑换/抽奖/盲盒请求:

image

顺便修了一下 #834 中的一个小问题:把奖池奖品表中的“属性”改为可选,不然所有的记录都必须要设置非空的属性。

@Deophius Deophius added the model changed 模型有修改 label Aug 30, 2024
app/models.py Outdated Show resolved Hide resolved
Removed the NULL flag because we have a non-null default value.
So if the user didn't take part in the required activity, the pool won't
show up in the `showPools` page.
Use class instead of string when specifying foreign key; add None as
default for Pool.activity
@pkuGenuine pkuGenuine merged commit 23235f7 into Yuanpei-Intelligence:develop Aug 31, 2024
1 check passed
@Deophius Deophius deleted the pool-activity branch August 31, 2024 07:21
@Deophius Deophius restored the pool-activity branch August 31, 2024 07:31
@Deophius Deophius deleted the pool-activity branch August 31, 2024 11:00
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model changed 模型有修改
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants