mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-12 19:30:30 +02:00
Added base schemas
This commit is contained in:
@@ -2,3 +2,4 @@ from .app import * # noqa
|
||||
from .crud import * # noqa
|
||||
from .models import * # noqa
|
||||
from .pagination import * # noqa
|
||||
from .schemas import * # noqa
|
||||
|
||||
1
creyPY/fastapi/schemas/__init__.py
Normal file
1
creyPY/fastapi/schemas/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .base import * # noqa
|
||||
15
creyPY/fastapi/schemas/base.py
Normal file
15
creyPY/fastapi/schemas/base.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from datetime import datetime
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class BaseSchemaModelIN(BaseModel):
|
||||
created_by_id: str
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class BaseSchemaModelOUT(BaseSchemaModelIN):
|
||||
id: UUID
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
Reference in New Issue
Block a user