This commit is contained in:
harold 2025-04-21 17:03:41 +05:00
parent 136f2a752a
commit 00629072be
3 changed files with 6 additions and 2 deletions

View File

@ -33,5 +33,6 @@ CREATE TABLE tg_messages (
CREATE TABLE prompts (
id SERIAL PRIMARY KEY ,
prompt TEXT NOT NULL,
role TEXT NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
)

View File

@ -12,11 +12,13 @@ class PromptAdmin(ModelView, model=Prompt):
column_list = [
Prompt.prompt,
Prompt.created_at
Prompt.created_at,
Prompt.role,
]
column_searchable_list = [
Prompt.prompt
Prompt.prompt,
Prompt.role,
]
column_sortable_list = [

View File

@ -12,6 +12,7 @@ class Prompt(Base):
primary_key=True,
autoincrement=True,
)
role: Mapped[str]
prompt: Mapped[str]
created_at: Mapped[datetime] = mapped_column(
default=datetime.utcnow,