2025-05-30 20:35:55 +00:00

17 lines
436 B
Python

"""
Base schemas for the application
"""
from datetime import datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict
class BaseSchema(BaseModel):
"""Base schema with common fields and config"""
model_config = ConfigDict(from_attributes=True)
class TimestampSchema(BaseSchema):
"""Schema with timestamp fields"""
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None