25 lines
926 B
Python
25 lines
926 B
Python
|
|
import reflex as rx
|
||
|
|
from sqlmodel import Field
|
||
|
|
from typing import Optional
|
||
|
|
|
||
|
|
class User(rx.Model, table=True):
|
||
|
|
"""Admin user credentials."""
|
||
|
|
username: str = Field(index=True)
|
||
|
|
password_hash: str
|
||
|
|
|
||
|
|
class Configuration(rx.Model, table=True):
|
||
|
|
"""Persistent application settings."""
|
||
|
|
# Gemini
|
||
|
|
gemini_api_key: Optional[str] = Field(default="")
|
||
|
|
input_folder: Optional[str] = Field(default="")
|
||
|
|
rewrite_tag: Optional[str] = Field(default="#rewrite")
|
||
|
|
philosophy: Optional[str] = Field(default="Keep notes atomic. Use Zettelkasten principles.")
|
||
|
|
|
||
|
|
# CouchDB
|
||
|
|
couchdb_url: Optional[str] = Field(default="")
|
||
|
|
couchdb_user: Optional[str] = Field(default="")
|
||
|
|
couchdb_password: Optional[str] = Field(default="")
|
||
|
|
couchdb_passphrase: Optional[str] = Field(default="")
|
||
|
|
couchdb_db_name: Optional[str] = Field(default="obsidian_livesync")
|
||
|
|
|
||
|
|
is_configured: bool = Field(default=False)
|