Add initial project
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""Tracking Pydantic schemas."""
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
from datetime import date
|
||||
|
||||
|
||||
class TrackingBase(BaseModel):
|
||||
"""Base schema for tracking."""
|
||||
date: date
|
||||
reps: int
|
||||
completed: bool = False
|
||||
notes: Optional[str] = None
|
||||
|
||||
|
||||
class TrackingCreate(TrackingBase):
|
||||
"""Schema for creating tracking."""
|
||||
challenge_id: int
|
||||
|
||||
|
||||
class TrackingResponse(TrackingBase):
|
||||
"""Schema for tracking response."""
|
||||
id: int
|
||||
challenge_id: int
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user