This commit is contained in:
Matteo Rosati
2026-02-18 15:39:01 +01:00
parent d4e9643afc
commit b64e97c9d0
12 changed files with 507 additions and 360 deletions

17
models/orm.py Normal file
View File

@@ -0,0 +1,17 @@
from sqlalchemy import create_engine, Column, String, Text, Integer
from sqlalchemy.orm import declarative_base
Base = declarative_base()
class Prompt(Base):
__tablename__ = "prompts"
id = Column(Integer, primary_key=True)
name = Column(String, nullable=False)
text = Column(Text, nullable=False)
if __name__ == "__main__":
engine = create_engine("sqlite:///example.db")
Base.metadata.create_all(engine)