gfregfregfr

This commit is contained in:
Administrator
2025-11-12 12:50:39 +08:00
commit 37e9d4038c
91 changed files with 108927 additions and 0 deletions

23
models/__init__.py Normal file
View File

@@ -0,0 +1,23 @@
import pymysql
from peewee import MySQLDatabase
# 安装 pymysql 作为 MySQLdb
pymysql.install_as_MySQLdb()
# 数据库配置
db_config = {
'database': 'hx',
'user': 'hx',
'password': 'haxi@123456',
'host': '192.168.11.30',
'port': 3306
}
# 全局数据库实例
db = MySQLDatabase(
db_config['database'],
user=db_config['user'],
password=db_config['password'],
host=db_config['host'],
port=db_config['port']
)