# Creazione entità "base", editor support, creazione, id automatici
# https://sqlmodel.tiangolo.com/tutorial/insert/
from typing import Optional
from sqlmodel import Field, SQLModel, Session, create_engine


class Tag(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class ProductType(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


sqlite_file_name = "database.db"
sqlite_url = f"sqlite:///{sqlite_file_name}"
engine = create_engine(sqlite_url, echo=True)


def create_db_and_tables():
    