add team creation and fetch information by id

This commit is contained in:
Timur
2025-03-02 01:58:02 +03:00
parent 0e9498a72d
commit 7a8046f028
4 changed files with 60 additions and 0 deletions
+15
View File
@@ -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", )