From 19abd25667100954957faecbfff57071c461f783 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Fri, 8 Dec 2023 14:33:02 +0800 Subject: [PATCH] update --- MQTT.py | 2 +- src/api.py => api.py | 0 src/create_db.py => create_db.py | 0 src/data_upload.py => data_upload.py | 0 {src => db}/__init__.py | 0 {src/db => db}/base.py | 0 {src/db => db/models}/__init__.py | 0 {src/db => db}/models/base.py | 0 {src/db => db}/models/lot_data_model.py | 2 +- {src/db => db}/repository/__init__.py | 0 {src/db => db}/repository/lot_data_repository.py | 4 ++-- {src/db => db}/session.py | 2 +- src/sensor_to_local.py => sensor_to_local.py | 0 src/sensor_to_server.py => sensor_to_server.py | 0 src/db/models/__init__.py | 0 src/tool.py => tool.py | 0 16 files changed, 5 insertions(+), 5 deletions(-) rename src/api.py => api.py (100%) rename src/create_db.py => create_db.py (100%) rename src/data_upload.py => data_upload.py (100%) rename {src => db}/__init__.py (100%) mode change 100644 => 100755 rename {src/db => db}/base.py (100%) rename {src/db => db/models}/__init__.py (100%) rename {src/db => db}/models/base.py (100%) rename {src/db => db}/models/lot_data_model.py (99%) rename {src/db => db}/repository/__init__.py (100%) rename {src/db => db}/repository/lot_data_repository.py (92%) rename {src/db => db}/session.py (96%) rename src/sensor_to_local.py => sensor_to_local.py (100%) rename src/sensor_to_server.py => sensor_to_server.py (100%) delete mode 100755 src/db/models/__init__.py rename src/tool.py => tool.py (100%) diff --git a/MQTT.py b/MQTT.py index ef156a1..f28d6d3 100644 --- a/MQTT.py +++ b/MQTT.py @@ -4,7 +4,7 @@ import time import paho.mqtt.client as mqtt -from src.tool import push_stream, close_stream, update, exec_sh, get_record, get_list_record, get_status +from tool import push_stream, close_stream, update, exec_sh, get_record, get_list_record, get_status def on_connect(client, userdata, flags, rc): diff --git a/src/api.py b/api.py similarity index 100% rename from src/api.py rename to api.py diff --git a/src/create_db.py b/create_db.py similarity index 100% rename from src/create_db.py rename to create_db.py diff --git a/src/data_upload.py b/data_upload.py similarity index 100% rename from src/data_upload.py rename to data_upload.py diff --git a/src/__init__.py b/db/__init__.py old mode 100644 new mode 100755 similarity index 100% rename from src/__init__.py rename to db/__init__.py diff --git a/src/db/base.py b/db/base.py similarity index 100% rename from src/db/base.py rename to db/base.py diff --git a/src/db/__init__.py b/db/models/__init__.py similarity index 100% rename from src/db/__init__.py rename to db/models/__init__.py diff --git a/src/db/models/base.py b/db/models/base.py similarity index 100% rename from src/db/models/base.py rename to db/models/base.py diff --git a/src/db/models/lot_data_model.py b/db/models/lot_data_model.py similarity index 99% rename from src/db/models/lot_data_model.py rename to db/models/lot_data_model.py index 05834a5..e189534 100755 --- a/src/db/models/lot_data_model.py +++ b/db/models/lot_data_model.py @@ -1,7 +1,7 @@ from pydantic import BaseModel, Field from sqlalchemy import * -from src.db.base import Base +from db.base import Base class LOT_DATA(BaseModel): diff --git a/src/db/repository/__init__.py b/db/repository/__init__.py similarity index 100% rename from src/db/repository/__init__.py rename to db/repository/__init__.py diff --git a/src/db/repository/lot_data_repository.py b/db/repository/lot_data_repository.py similarity index 92% rename from src/db/repository/lot_data_repository.py rename to db/repository/lot_data_repository.py index 33d61ed..2647c6b 100755 --- a/src/db/repository/lot_data_repository.py +++ b/db/repository/lot_data_repository.py @@ -1,5 +1,5 @@ -from src.db.models.lot_data_model import LOT_DATA_MODEL, LOT_DATA -from src.db.session import with_session +from db.models.lot_data_model import LOT_DATA_MODEL, LOT_DATA +from db.session import with_session @with_session diff --git a/src/db/session.py b/db/session.py similarity index 96% rename from src/db/session.py rename to db/session.py index 591fc2d..ad7f161 100755 --- a/src/db/session.py +++ b/db/session.py @@ -2,7 +2,7 @@ from functools import wraps from contextlib import contextmanager from sqlalchemy.orm import Session -from src.db.base import SessionLocal +from db.base import SessionLocal @contextmanager diff --git a/src/sensor_to_local.py b/sensor_to_local.py similarity index 100% rename from src/sensor_to_local.py rename to sensor_to_local.py diff --git a/src/sensor_to_server.py b/sensor_to_server.py similarity index 100% rename from src/sensor_to_server.py rename to sensor_to_server.py diff --git a/src/db/models/__init__.py b/src/db/models/__init__.py deleted file mode 100755 index e69de29..0000000 diff --git a/src/tool.py b/tool.py similarity index 100% rename from src/tool.py rename to tool.py