# Lettura dati con SQLModel, all, first, one; update; delete
# https://sqlmodel.tiangolo.com/tutorial/select/ e seguito
from typing import Optional
from sqlmodel import Field, SQLModel, Session, create_engine, select


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():
    