mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 02:47:10 +00:00
add team creation and fetch information by id
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from ninja import ModelSchema, Schema
|
||||
|
||||
from apps.team.models import Team
|
||||
|
||||
|
||||
class CreateTeamSchema(ModelSchema):
|
||||
class Meta:
|
||||
model = Team
|
||||
fields = ("name", "members",)
|
||||
|
||||
|
||||
class TeamSchemaOut(ModelSchema):
|
||||
class Meta:
|
||||
model = Team
|
||||
fields = ("id", "name", "owner", "members", )
|
||||
Reference in New Issue
Block a user