init
This commit is contained in:
41
app/schemas/hackathon.py
Normal file
41
app/schemas/hackathon.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas.user import UserRead
|
||||
|
||||
|
||||
class HackathonCreate(BaseModel):
|
||||
title: str
|
||||
description: str
|
||||
start_date: datetime
|
||||
end_date: datetime
|
||||
|
||||
|
||||
class HackathonRead(BaseModel):
|
||||
id: int
|
||||
title: str
|
||||
description: str
|
||||
start_date: datetime
|
||||
end_date: datetime
|
||||
organizer_id: int
|
||||
|
||||
|
||||
class HackathonReadWithOrganizer(HackathonRead):
|
||||
organizer: UserRead
|
||||
|
||||
|
||||
class ParticipantRegistration(BaseModel):
|
||||
hackathon_id: int
|
||||
|
||||
|
||||
class ParticipantRead(BaseModel):
|
||||
id: int
|
||||
user_id: int
|
||||
hackathon_id: int
|
||||
is_confirmed: bool
|
||||
user: UserRead
|
||||
|
||||
|
||||
class ParticipantConfirm(BaseModel):
|
||||
user_id: int
|
||||
Reference in New Issue
Block a user