"""Instancia da tabela User e seus metodos"""
from typing import Optional, List, TYPE_CHECKING
from datetime import datetime
from sqlalchemy import UniqueConstraint
from sqlmodel import SQLModel, Field, Relationship

if TYPE_CHECKING:
    from .tokens import Token


class User(SQLModel, table=True):
    """Tabela de usuarios"""

    __table_args__ = (UniqueConstraint("email", "username"),)

    id: Optional[int] = 