chore: add changelog and documentation updates
All checks were successful
CI / lint-and-test (push) Successful in 17s
All checks were successful
CI / lint-and-test (push) Successful in 17s
- Created a new `CHANGELOG.md` file to document all notable changes to the project, adhering to the Keep a Changelog format. - Updated `CONTRIBUTING.md` to include instructions for building and previewing documentation using MkDocs. - Added `mkdocs.yml` configuration for documentation generation, including navigation structure and theme settings. - Enhanced various documentation files, including API reference, architecture overview, configuration reference, and runbook, to provide comprehensive guidance for users and developers. - Included new sections in the README for changelog and documentation links, improving accessibility to project information.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Pydantic schemas for API and validation."""
|
||||
"""Pydantic schemas for API request/response and validation."""
|
||||
|
||||
from typing import Literal
|
||||
|
||||
@@ -6,6 +6,8 @@ from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class UserBase(BaseModel):
|
||||
"""Base user fields (full_name, username, first/last name)."""
|
||||
|
||||
full_name: str
|
||||
username: str | None = None
|
||||
first_name: str | None = None
|
||||
@@ -13,10 +15,14 @@ class UserBase(BaseModel):
|
||||
|
||||
|
||||
class UserCreate(UserBase):
|
||||
"""User creation payload including Telegram user id."""
|
||||
|
||||
telegram_user_id: int
|
||||
|
||||
|
||||
class UserInDb(UserBase):
|
||||
"""User as stored in DB (includes id and telegram_user_id)."""
|
||||
|
||||
id: int
|
||||
telegram_user_id: int
|
||||
|
||||
@@ -24,16 +30,22 @@ class UserInDb(UserBase):
|
||||
|
||||
|
||||
class DutyBase(BaseModel):
|
||||
"""Duty fields: user_id, start_at, end_at (UTC ISO 8601 with Z)."""
|
||||
|
||||
user_id: int
|
||||
start_at: str # UTC, ISO 8601 with Z
|
||||
end_at: str # UTC, ISO 8601 with Z
|
||||
|
||||
|
||||
class DutyCreate(DutyBase):
|
||||
"""Duty creation payload."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class DutyInDb(DutyBase):
|
||||
"""Duty as stored in DB (includes id)."""
|
||||
|
||||
id: int
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
Reference in New Issue
Block a user