chore: initial commit with config ignores
This commit is contained in:
24
models/xtoken.py
Normal file
24
models/xtoken.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from peewee import *
|
||||
# 假设 db 已经在其他地方定义并连接到数据库
|
||||
from models import db1
|
||||
|
||||
|
||||
class XToken(Model):
|
||||
id = AutoField(primary_key=True) # 自增主键
|
||||
hub_id = IntegerField(null=True) # hub_id 字段,整型,可为空
|
||||
start = IntegerField(null=True) # start 字段,整型,可为空
|
||||
account_start = IntegerField(null=True) # account_start 字段,整型,可为空
|
||||
user_name = CharField(max_length=255, null=True) # user_name 字段,最大长度 255,可为空
|
||||
password = CharField(max_length=255, null=True) # password 字段,最大长度 255,可为空
|
||||
email = CharField(max_length=255, null=True) # email 字段,最大长度 255,可为空
|
||||
two_fa = CharField(max_length=255, null=True) # 2fa 字段,由于 2fa 是 Python 中的无效标识符,这里使用 two_fa 替代,最大长度 255,可为空
|
||||
token = CharField(max_length=255, null=True) # token 字段,最大长度 255,可为空
|
||||
email_pwd = CharField(max_length=255, null=True) # token 字段,最大长度 255,可为空
|
||||
|
||||
class Meta:
|
||||
database = db1 # 所属数据库
|
||||
table_name = 'x_token' # 表名
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
XToken.create_table()
|
||||
Reference in New Issue
Block a user