Files
tg_code/job_models/tg_zoo.py
Administrator 37e9d4038c gfregfregfr
2025-11-12 12:50:39 +08:00

14 lines
600 B
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 *
from models import db # 假设 db 是已经在其他地方定义的数据库连接
class TgZoo(Model):
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' # 指定表名