- Add bottle_size field to User model and UserResponse/UserUpdate schemas - Settings modal includes bottle size input (shots capacity) - Community bottles and My Bottle page show fill bar based on bottle size - Community bottle cards are clickable — opens searchable bourbon list modal - Add total_shots_added stat to replace duplicate net volume on dashboard - Reorder dashboard stats: Bourbons Added, Total Poured In, Shots Remaining, Est. Proof - Theme-matched custom scrollbar (amber on dark) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
975 B
Python
44 lines
975 B
Python
from datetime import datetime, date
|
|
from typing import Optional
|
|
from pydantic import BaseModel
|
|
|
|
from app.models.entry import EntryType
|
|
|
|
|
|
class EntryCreate(BaseModel):
|
|
entry_type: EntryType
|
|
date: date
|
|
bourbon_name: Optional[str] = None
|
|
proof: Optional[float] = None
|
|
amount_shots: float = 1.0
|
|
notes: Optional[str] = None
|
|
|
|
|
|
class EntryResponse(BaseModel):
|
|
id: int
|
|
entry_type: EntryType
|
|
date: date
|
|
bourbon_name: Optional[str]
|
|
proof: Optional[float]
|
|
amount_shots: float
|
|
notes: Optional[str]
|
|
created_at: datetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class BottleStats(BaseModel):
|
|
total_add_entries: int
|
|
total_shots_added: float
|
|
current_total_shots: float
|
|
estimated_proof: Optional[float]
|
|
|
|
|
|
class PublicUserStats(BaseModel):
|
|
display_name: str
|
|
total_add_entries: int
|
|
current_total_shots: float
|
|
estimated_proof: Optional[float]
|
|
bottle_size: Optional[float]
|
|
bourbons: list[str]
|