feat: 초기 프로젝트 구조 추가

This commit is contained in:
Kim Min Jae
2026-06-10 16:18:41 +09:00
parent 5d985560c5
commit a48a4b5fe5
100 changed files with 10530 additions and 0 deletions

36
db/mysql_client.py Normal file
View File

@@ -0,0 +1,36 @@
# DB 클라이언트 — MySQL 연결 및 리플렉터 데이터 조회
import pymysql
class MySQLClient:
def __init__(self):
self._conn = None
def connect(self, host: str, port: int, user: str, password: str, database: str):
self._conn = pymysql.connect(
host=host, port=port, user=user,
password=password, database=database,
charset="utf8mb4", autocommit=True,
)
print(f"[DB] 연결 성공: {host}:{port}/{database}")
def disconnect(self):
if self._conn:
self._conn.close()
self._conn = None
print("[DB] 연결 종료")
def is_connected(self) -> bool:
return self._conn is not None
def get_reflector_list(self) -> list[dict]:
"""리플렉터 목록 조회 — 반환: [{"id": ..., "name": ..., "type": ...}, ...]"""
pass
def save_reflector(self, name: str, type_lr: str, pattern_data: bytes):
"""리플렉터 등록/갱신 — 미구현"""
pass
def save_inspection_result(self, product_id: int, result: str, defects: list):
"""검사 결과 저장 — 미구현"""
pass