Files
regwatch-backend/database/models.py
T
neckfireandClaude Opus 4.8 3d007c7013
Build & Deploy / build (push) Successful in 23s
RegWatch backend : FastAPI + Postgres partagé + Docker/CI homelab
- SECRET_KEY et DATABASE_URL externalisés (Vault -> env), plus de secret en dur
- SQLite -> postgres-shared (psycopg2), schéma créé au boot (entrypoint.sh)
- Dockerfile + docker-compose (Watchtower) + .gitea/workflows/build.yml

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 18:43:17 +02:00

21 lines
656 B
Python

from sqlalchemy import Column, Integer, String
from database.database import Base
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
email = Column(String, unique=True, index=True)
password = Column(String)
full_name = Column(String, nullable=True)
class Document(Base):
__tablename__ = "documents"
id = Column(Integer, primary_key=True, index=True)
title = Column(String)
ingredient = Column(String)
source = Column(String)
document_type = Column(String)
meeting_date = Column(String, nullable=True)
pdf_url = Column(String, unique=True)