做了文件结构的调整,新建了service文件夹存放内部服务。添加了git ignore

This commit is contained in:
carry 2025-01-20 15:26:40 +08:00
parent c73edc794f
commit 01ff669e8d
4 changed files with 33 additions and 4 deletions

30
.gitignore vendored Normal file
View File

@ -0,0 +1,30 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Virtual environments
venv/
env/
.venv/
# IDE specific files
.vscode/
.idea/
# Environment variables
.env
.env.local
# Logs and databases
*.log
*.sqlite3
# Testing
.coverage
htmlcov/
# Python packaging
*.egg-info/
dist/
build/

View File

@ -1,4 +1,3 @@
from .user import User
from .database import init_db
__all__ = ["User", "init_db"]
__all__ = ["User"]

View File

@ -1,8 +1,8 @@
from sqlalchemy.ext.asyncio import AsyncEngine
from .user import Base, User, UserRole
from ..models.user import Base, User, UserRole
from sqlalchemy import select
from config import SYSTEM_ADMIN_CONFIG
from service.auth import get_password_hash
from services.auth import get_password_hash
async def init_db(engine: AsyncEngine):
"""Initialize database"""