from tortoise import fields

from app.models.base import BaseModel


class User(BaseModel):
    username = fields.CharField(max_length=50, unique=True)
    email = fields.CharField(max_length=255, unique=True)
    hashed_password = fields.CharField(max_length=255)
    is_active = fields.BooleanField(default=True)

    class Meta(BaseModel.Meta):
        table = "users"
        abstract = False
