From 7f87c0f5d516107d97efc4a36238990c18221357 Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Fri, 8 Mar 2024 20:45:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20unused=20schemas=20(#65?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/schemas/__init__.py | 4 ---- backend/app/schemas/item.py | 35 --------------------------------- backend/app/schemas/msg.py | 5 ----- backend/app/schemas/token.py | 10 ---------- backend/app/schemas/user.py | 35 --------------------------------- 5 files changed, 89 deletions(-) delete mode 100644 backend/app/schemas/__init__.py delete mode 100644 backend/app/schemas/item.py delete mode 100644 backend/app/schemas/msg.py delete mode 100644 backend/app/schemas/token.py delete mode 100644 backend/app/schemas/user.py diff --git a/backend/app/schemas/__init__.py b/backend/app/schemas/__init__.py deleted file mode 100644 index a6ce47f..0000000 --- a/backend/app/schemas/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .item import Item, ItemCreate, ItemInDB, ItemUpdate -from .msg import Msg -from .token import Token, TokenPayload -from .user import User, UserCreate, UserInDB, UserUpdate \ No newline at end of file diff --git a/backend/app/schemas/item.py b/backend/app/schemas/item.py deleted file mode 100644 index 2a54112..0000000 --- a/backend/app/schemas/item.py +++ /dev/null @@ -1,35 +0,0 @@ -from pydantic import BaseModel, ConfigDict - - -# Shared properties -class ItemBase(BaseModel): - title: str | None = None - description: str | None = None - - -# Properties to receive on item creation -class ItemCreate(ItemBase): - title: str - - -# Properties to receive on item update -class ItemUpdate(ItemBase): - pass - - -# Properties shared by models stored in DB -class ItemInDBBase(ItemBase): - id: int - title: str - owner_id: int - model_config = ConfigDict(from_attributes=True) - - -# Properties to return to client -class Item(ItemInDBBase): - pass - - -# Properties properties stored in DB -class ItemInDB(ItemInDBBase): - pass diff --git a/backend/app/schemas/msg.py b/backend/app/schemas/msg.py deleted file mode 100644 index 945e0c6..0000000 --- a/backend/app/schemas/msg.py +++ /dev/null @@ -1,5 +0,0 @@ -from pydantic import BaseModel - - -class Msg(BaseModel): - msg: str diff --git a/backend/app/schemas/token.py b/backend/app/schemas/token.py deleted file mode 100644 index 17c7402..0000000 --- a/backend/app/schemas/token.py +++ /dev/null @@ -1,10 +0,0 @@ -from pydantic import BaseModel - - -class Token(BaseModel): - access_token: str - token_type: str - - -class TokenPayload(BaseModel): - sub: int | None = None diff --git a/backend/app/schemas/user.py b/backend/app/schemas/user.py deleted file mode 100644 index 916567f..0000000 --- a/backend/app/schemas/user.py +++ /dev/null @@ -1,35 +0,0 @@ -from pydantic import BaseModel, ConfigDict, EmailStr - - -# Shared properties -class UserBase(BaseModel): - email: EmailStr | None = None - is_active: bool | None = True - is_superuser: bool = False - full_name: str | None = None - - -# Properties to receive via API on creation -class UserCreate(UserBase): - email: EmailStr - password: str - - -# Properties to receive via API on update -class UserUpdate(UserBase): - password: str | None = None - - -class UserInDBBase(UserBase): - id: int | None = None - model_config = ConfigDict(from_attributes=True) - - -# Additional properties to return via API -class User(UserInDBBase): - pass - - -# Additional properties stored in DB -class UserInDB(UserInDBBase): - hashed_password: str