19 lines
973 B
Python
19 lines
973 B
Python
from peewee import *
|
||
|
||
# 假设 db 已经在其他地方定义并连接到数据库
|
||
from models import db
|
||
|
||
class TgTime(Model):
|
||
id = IntegerField(primary_key=True) # 整型主键
|
||
phone = CharField(max_length=255, null=True) # 手机号,最大长度 255,可为空
|
||
fraction = CharField(max_length=255, null=True) # 分数,最大长度 255,可为空
|
||
user_data = CharField(max_length=999, null=True) # 用户数据,最大长度 999,可为空
|
||
link_url = CharField(max_length=255, null=True) # 链接 URL,最大长度 255,可为空
|
||
num = IntegerField(null=True) # 新增字段,整型,可为空
|
||
num1 = IntegerField(null=True) # 新增字段,整型,可为空
|
||
receive_day_reward = IntegerField(null=True) # 新增字段,整型,可为空
|
||
log_time = DateTimeField(null=True) # 新增字段,时间戳,可为空
|
||
|
||
class Meta:
|
||
database = db # 所属数据库
|
||
table_name = 'tg_time' # 表名 |