Files
codex_jxs_code/models/xtoken.py
2026-02-21 18:25:34 +08:00

25 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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()