17 lines
436 B
Python
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 |