
from datetime import date, datetime
from typing import Optional
from pydantic import BaseModel, validator
from sqlmodel import Field, SQLModel


# Simple classes for access control tokens
class Token(BaseModel):
    access_token: str
    token_type: str
    expiry: datetime


class TokenData(BaseModel):
    username: Optional[str] = None


# Default user class, this is the one to interact with.
class User(SQLModel):
    id: Optional[int] = 