update for restructure
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from peewee import SqliteDatabase, Model, CharField, IntegerField, FloatField, BooleanField
|
||||
|
||||
from core.logger import LogLevel, PrintLog
|
||||
from xtquant import xtconstant
|
||||
|
||||
# 连接到SQLite数据库
|
||||
db = SqliteDatabase('example.db')
|
||||
|
||||
db.connect()
|
||||
PrintLog(LogLevel.INFO, '- [成功]数据库连接')
|
||||
# 定义基础模型类
|
||||
class BaseModel(Model):
|
||||
class Meta:
|
||||
database = db
|
||||
Reference in New Issue
Block a user