from __future__ import annotations from typing import Literal, Optional from pydantic import BaseModel EventType = Literal[ "planted", "watered", "fed", "pruned", "sprayed", "observation", "harvest", "repotted", "note", ] class GrowEventCreate(BaseModel): plant_id: int event_type: EventType event_date: str value_num: Optional[float] = None value_unit: Optional[str] = None note: Optional[str] = None photo_path: Optional[str] = None class GrowEventOut(BaseModel): id: int plant_id: int event_type: str event_date: str value_num: Optional[float] value_unit: Optional[str] note: Optional[str] photo_path: Optional[str] created_at: str