- crates/ld-engine : formule inertielle (parité avec la maquette, garde C), coquille / changement de fond, assistant d'édition à règles, composition d'un document sous vote permanent (adoptions, aperçus, rivales). - crates/trustin-access : qui voit, qui ouvre, qui gère les accès. - crates/ld-server : API axum + SQLite, connexion Ğ1 (client OAuth2 de connect.monnaie-libre.fr), invitations, entrée en vigueur automatique, signalements de contradiction, traductions éditoriales, publication git, taille de la toile lue sur la chaîne. - seeds/acte-engagement-certification.json : 33 articles, fr + en + es ; en vigueur : préambule, E1, E2 (seed a minima). - maquette/ : frontend, backend et docker v2 déplacés tels quels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.0 KiB
Python
23 lines
1.0 KiB
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from sqlalchemy import String, Integer, Text, DateTime, Uuid, func
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.database import Base
|
|
|
|
|
|
class SanctuaryEntry(Base):
|
|
__tablename__ = "sanctuary_entries"
|
|
|
|
id: Mapped[uuid.UUID] = mapped_column(Uuid, primary_key=True, default=uuid.uuid4)
|
|
entry_type: Mapped[str] = mapped_column(String(64), nullable=False) # document, decision, vote_result
|
|
reference_id: Mapped[uuid.UUID] = mapped_column(Uuid, nullable=False)
|
|
title: Mapped[str | None] = mapped_column(String(256))
|
|
content_hash: Mapped[str] = mapped_column(String(128), nullable=False) # SHA-256
|
|
ipfs_cid: Mapped[str | None] = mapped_column(String(128))
|
|
chain_tx_hash: Mapped[str | None] = mapped_column(String(128))
|
|
chain_block: Mapped[int | None] = mapped_column(Integer)
|
|
metadata_json: Mapped[str | None] = mapped_column(Text) # JSON string for extra data
|
|
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
|