Как можно воссоздать подобную таблицу?
Вот мой код, но он не рабочий
from peewee import IntegerField, SqliteDatabase, Model, DateTimeField, CharField, ForeignKeyField
class BaseModel(Model):
class Meta:
database = db
class Users(BaseModel):
id = IntegerField(primary_key=True)
user_id = IntegerField()
username = CharField(null=True)
first_name = CharField()
status = IntegerField(default=0)
wallet = CharField(default='Не указан')
pay_tag = CharField(null=True)
balance = IntegerField(default=0)
mentor = ForeignKeyField('Mentors', related_name='mentors', null=True)
date = DateTimeField(default=datetime.datetime.now())
class Mentors(BaseModel):
id = IntegerField(primary_key=True)
user = ForeignKeyField(Users, field='user_id', null=True)
percent_mentor = IntegerField()
description = CharField(null=True)