From 57b33398238447aed4ddad2d75ff36cc5f6627fd Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Fri, 8 Dec 2023 14:30:47 +0800 Subject: [PATCH] update --- {db => src/db}/__init__.py | 0 {db => src/db}/base.py | 0 {db => src/db}/models/__init__.py | 0 {db => src/db}/models/base.py | 0 {db => src/db}/models/lot_data_model.py | 2 +- {db => src/db}/repository/__init__.py | 0 {db => src/db}/repository/lot_data_repository.py | 4 ++-- {db => src/db}/session.py | 2 +- 8 files changed, 4 insertions(+), 4 deletions(-) rename {db => src/db}/__init__.py (100%) rename {db => src/db}/base.py (100%) rename {db => src/db}/models/__init__.py (100%) rename {db => src/db}/models/base.py (100%) rename {db => src/db}/models/lot_data_model.py (99%) rename {db => src/db}/repository/__init__.py (100%) rename {db => src/db}/repository/lot_data_repository.py (92%) rename {db => src/db}/session.py (96%) diff --git a/db/__init__.py b/src/db/__init__.py similarity index 100% rename from db/__init__.py rename to src/db/__init__.py diff --git a/db/base.py b/src/db/base.py similarity index 100% rename from db/base.py rename to src/db/base.py diff --git a/db/models/__init__.py b/src/db/models/__init__.py similarity index 100% rename from db/models/__init__.py rename to src/db/models/__init__.py diff --git a/db/models/base.py b/src/db/models/base.py similarity index 100% rename from db/models/base.py rename to src/db/models/base.py diff --git a/db/models/lot_data_model.py b/src/db/models/lot_data_model.py similarity index 99% rename from db/models/lot_data_model.py rename to src/db/models/lot_data_model.py index e189534..05834a5 100755 --- a/db/models/lot_data_model.py +++ b/src/db/models/lot_data_model.py @@ -1,7 +1,7 @@ from pydantic import BaseModel, Field from sqlalchemy import * -from db.base import Base +from src.db.base import Base class LOT_DATA(BaseModel): diff --git a/db/repository/__init__.py b/src/db/repository/__init__.py similarity index 100% rename from db/repository/__init__.py rename to src/db/repository/__init__.py diff --git a/db/repository/lot_data_repository.py b/src/db/repository/lot_data_repository.py similarity index 92% rename from db/repository/lot_data_repository.py rename to src/db/repository/lot_data_repository.py index 2647c6b..33d61ed 100755 --- a/db/repository/lot_data_repository.py +++ b/src/db/repository/lot_data_repository.py @@ -1,5 +1,5 @@ -from db.models.lot_data_model import LOT_DATA_MODEL, LOT_DATA -from db.session import with_session +from src.db.models.lot_data_model import LOT_DATA_MODEL, LOT_DATA +from src.db.session import with_session @with_session diff --git a/db/session.py b/src/db/session.py similarity index 96% rename from db/session.py rename to src/db/session.py index ad7f161..591fc2d 100755 --- a/db/session.py +++ b/src/db/session.py @@ -2,7 +2,7 @@ from functools import wraps from contextlib import contextmanager from sqlalchemy.orm import Session -from db.base import SessionLocal +from src.db.base import SessionLocal @contextmanager