Files
lm_code/models/weex.py
2025-10-13 11:22:02 +08:00

23 lines
402 B
Python

from peewee import *
from models import db
class Weex(Model):
id = IntegerField(primary_key=True)
open = FloatField(null=True)
high = FloatField(null=True)
low = FloatField(null=True)
close = FloatField(null=True)
class Meta:
database = db
table_name = 'weex'
# 连接到数据库
db.connect()
# 创建表(如果表不存在)
db.create_tables([Weex])