42 lines
699 B
Python
42 lines
699 B
Python
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
|