Files
to_session/models/tg_zoo.py
Administrator a0720d80dc fefdwef
2025-11-12 12:54:37 +08:00

14 lines
615 B
Python
Raw Permalink 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 *
from models import db, BaseModel # 假设 db 是已经在其他地方定义的数据库连接
class TgZoo(BaseModel):
id = AutoField(primary_key=True) # 对应 `id` 列,自动递增的主键
phone = CharField(max_length=255, null=True) # 对应 `phone` 列,最大长度 255允许为空
user_data = CharField(max_length=999, null=True) # 对应 `user_data` 列,最大长度 999允许为空
wallet_id = IntegerField(null=True) # 数字,允许为空
class Meta:
database = db # 指定数据库连接
table_name = 'tg_zoo' # 指定表名