- Add preferred_name column to settings model/schema with migration - Settings page gets Profile card with name input (saves on blur/enter) - Dashboard greeting now shows "Good evening, Kyle." when name is set - WeekTimeline dots use event's actual color when available - New DayBriefing component shows time-of-day-aware contextual summary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
744 B
Python
17 lines
744 B
Python
from sqlalchemy import String, Integer, func
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from datetime import datetime
|
|
from app.database import Base
|
|
|
|
|
|
class Settings(Base):
|
|
__tablename__ = "settings"
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True, index=True)
|
|
pin_hash: Mapped[str] = mapped_column(String(255), nullable=False)
|
|
accent_color: Mapped[str] = mapped_column(String(20), default="cyan")
|
|
upcoming_days: Mapped[int] = mapped_column(Integer, default=7)
|
|
preferred_name: Mapped[str | None] = mapped_column(String(100), nullable=True, default=None)
|
|
created_at: Mapped[datetime] = mapped_column(default=func.now())
|
|
updated_at: Mapped[datetime] = mapped_column(default=func.now(), onupdate=func.now())
|