-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from mradigen/master
Add coins to teams and user add/remove route
- Loading branch information
Showing
13 changed files
with
304 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from __future__ import annotations | ||
|
||
from tortoise.models import Model | ||
from tortoise import fields | ||
|
||
from pwncore.models.ctf import BaseProblem | ||
|
||
__all__ = ( | ||
"PreEventSolvedProblem", | ||
"PreEventProblem", | ||
) | ||
|
||
|
||
class PreEventProblem(BaseProblem): | ||
flag = fields.TextField() | ||
url = fields.TextField() # Link to CTF file/repo/website | ||
|
||
|
||
class PreEventSolvedProblem(Model): | ||
tag = fields.CharField(128) | ||
problem: fields.ForeignKeyRelation[PreEventProblem] = fields.ForeignKeyField( | ||
"models.PreEventProblem" | ||
) | ||
solved_at = fields.DatetimeField(auto_now_add=True) | ||
|
||
class Meta: | ||
unique_together = (("tag", "problem"),) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.