mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-16 05:10:31 +02:00
Added base schemas
This commit is contained in:
@@ -2,3 +2,4 @@ from .app import * # noqa
|
|||||||
from .crud import * # noqa
|
from .crud import * # noqa
|
||||||
from .models import * # noqa
|
from .models import * # noqa
|
||||||
from .pagination 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
|
||||||
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="creyPY",
|
name="creyPY",
|
||||||
version="0.0.8",
|
version="0.0.9",
|
||||||
description="My collection of Python and FastAPI shortcuts etc.",
|
description="My collection of Python and FastAPI shortcuts etc.",
|
||||||
author="Conrad Großer",
|
author="Conrad Großer",
|
||||||
author_email="conrad@noah.tech",
|
author_email="conrad@noah.tech",
|
||||||
|
|||||||
Reference in New Issue
Block a user