init commit

This commit is contained in:
2025-12-10 22:09:31 +09:00
commit b79adf1c69
361 changed files with 47414 additions and 0 deletions

29
app/schemas/budget.py Normal file
View File

@@ -0,0 +1,29 @@
"""Budget schemas"""
from pydantic import BaseModel
from datetime import datetime
from typing import Optional
class BudgetCreateSchema(BaseModel):
"""Schema for creating budget"""
name: str
limit_amount: float
period: str = "monthly"
alert_threshold: float = 80.0
category_id: Optional[int] = None
start_date: datetime
class BudgetSchema(BudgetCreateSchema):
"""Budget response schema"""
id: int
family_id: int
spent_amount: float
is_active: bool
end_date: Optional[datetime] = None
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True