18 lines
723 B
Python
18 lines
723 B
Python
from peewee import *
|
|
from models import db
|
|
|
|
|
|
class Nexus(Model):
|
|
id = AutoField(primary_key=True) # 自增主键
|
|
text = CharField(max_length=255, null=True) # 允许NULL的字符串
|
|
num = FloatField(null=True) # 允许NULL的整型
|
|
to_id = IntegerField(null=True) # 允许NULL的整型
|
|
h = IntegerField(null=True) # 允许NULL的整型
|
|
private_key = CharField(max_length=255, null=True) # 允许NULL的密钥字段
|
|
address = CharField(max_length=255, null=True) # 允许NULL的密钥字段
|
|
num1 = CharField(max_length=255, null=True) # 允许NULL的密钥字段
|
|
|
|
class Meta:
|
|
database = db # 使用共享数据库连接
|
|
table_name = 'nexus' # 显式指定表名
|