from models import db
from peewee import *


class TgXpin(Model):
    id = AutoField()  # 对应 `id` INT AUTO_INCREMENT PRIMARY KEY
    phone = CharField(max_length=255, null=True)  # 对应 `phone` VARCHAR(255)
    user_data = CharField(max_length=999, null=True)  # 对应 `user_data` VARCHAR(999)
    code = CharField(max_length=255, null=True)  # 对应 `code` VARCHAR(255)
    num = IntegerField(null=True)  # 对应 `num` INT
    fraction = CharField(max_length=255, null=True)  # 对应 `code` VARCHAR(255)
    join_num = IntegerField(null=True)  # 对应 `num` INT

    class Meta:
        database = db
        table_name = 'tg_xpin'
