ts-lyceum-back/db/models/user.py
2023-11-30 21:01:57 +03:00

11 lines
341 B
Python

# from peewee import *
from tortoise.models import Model
from tortoise.fields.data import *
from db.db_conf import MAX_LOGIN_LENGTH
class User(Model):
id = IntField(pk=True)
username = CharField(max_length=MAX_LOGIN_LENGTH, null=False, unique=True)
password = TextField(null=False)
first_login = BooleanField(default=True)