2023-06-15 15:28:37 +02:00
|
|
|
"""
|
|
|
|
This file is part of spip2md.
|
|
|
|
Copyright (C) 2023 LCPQ/Guilhem Fauré
|
|
|
|
|
|
|
|
spip2md is free software: you can redistribute it and/or modify it under the terms of
|
|
|
|
the GNU General Public License version 2 as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
spip2md is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with spip2md.
|
|
|
|
If not, see <https://www.gnu.org/licenses/>.
|
2023-06-21 14:55:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
This file defines Spip database as objects, attributes and methods with Peewee
|
2023-06-15 15:28:37 +02:00
|
|
|
"""
|
2023-05-22 14:45:43 +02:00
|
|
|
# type: ignore
|
2023-05-16 15:55:51 +02:00
|
|
|
from peewee import (
|
|
|
|
SQL,
|
|
|
|
BigAutoField,
|
|
|
|
BigIntegerField,
|
|
|
|
CharField,
|
|
|
|
CompositeKey,
|
|
|
|
DateField,
|
|
|
|
DateTimeField,
|
|
|
|
FloatField,
|
|
|
|
IntegerField,
|
|
|
|
Model,
|
|
|
|
MySQLDatabase,
|
|
|
|
TextField,
|
|
|
|
)
|
2023-04-21 15:07:49 +02:00
|
|
|
|
2023-06-21 14:55:09 +02:00
|
|
|
DB: MySQLDatabase = MySQLDatabase(None)
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class BaseModel(Model):
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
database = DB
|
2023-04-21 15:07:49 +02:00
|
|
|
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
class SpipArticles(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
accepter_forum = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
chapo = TextField()
|
2023-05-24 12:04:42 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
2023-05-25 14:20:39 +02:00
|
|
|
date_modif = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_redac = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
descriptif = TextField()
|
|
|
|
export = CharField(constraints=[SQL("DEFAULT 'oui'")], null=True)
|
|
|
|
extra = TextField(null=True)
|
|
|
|
id_article = BigAutoField()
|
|
|
|
id_rubrique = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_secteur = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_trad = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_version = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
lang = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
langue_choisie = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
microblog = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
nom_site = TextField()
|
|
|
|
popularite = FloatField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
ps = TextField()
|
|
|
|
referers = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
soustitre = TextField()
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
surtitre = TextField()
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
|
|
|
url_site = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
virtuel = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
visites = IntegerField(constraints=[SQL("DEFAULT 0")])
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_articles"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("statut", "date"), False),)
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipAuteurs(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
alea_actuel = TextField()
|
|
|
|
alea_futur = TextField()
|
|
|
|
bio = TextField()
|
|
|
|
cookie_oubli = TextField()
|
|
|
|
email = TextField()
|
|
|
|
en_ligne = DateTimeField(
|
2023-04-21 15:58:29 +02:00
|
|
|
constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")], index=True
|
|
|
|
)
|
2023-05-25 14:20:39 +02:00
|
|
|
extra = TextField(null=True)
|
|
|
|
htpass = TextField()
|
|
|
|
id_auteur = BigAutoField()
|
|
|
|
imessage = CharField()
|
|
|
|
lang = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
login = CharField(index=True)
|
|
|
|
low_sec = TextField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
messagerie = CharField()
|
|
|
|
nom = TextField()
|
|
|
|
nom_site = TextField()
|
|
|
|
pass_ = TextField(column_name="pass")
|
|
|
|
pgp = TextField()
|
|
|
|
prefs = TextField()
|
|
|
|
source = CharField(constraints=[SQL("DEFAULT 'spip'")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")], index=True)
|
|
|
|
url_site = TextField()
|
|
|
|
webmestre = CharField(constraints=[SQL("DEFAULT 'non'")])
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_auteurs"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipAuteursLiens(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_auteur = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
vu = CharField(constraints=[SQL("DEFAULT 'non'")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_auteurs_liens"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_auteur", "id_objet", "objet"), True),)
|
|
|
|
primary_key = CompositeKey("id_auteur", "id_objet", "objet")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipBreves(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date_heure = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
extra = TextField(null=True)
|
|
|
|
id_breve = BigAutoField()
|
|
|
|
id_rubrique = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
lang = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
langue_choisie = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
lien_titre = TextField()
|
|
|
|
lien_url = TextField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_breves"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipDepots(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
descriptif = TextField()
|
|
|
|
id_depot = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
nbr_autres = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
nbr_paquets = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
nbr_plugins = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
sha_paquets = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
titre = TextField()
|
|
|
|
type = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
url_archives = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
url_brouteur = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
url_commits = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
url_serveur = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
xml_paquets = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_depots"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipDepotsPlugins(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_depot = BigIntegerField()
|
|
|
|
id_plugin = BigIntegerField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_depots_plugins"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_depot", "id_plugin"), True),)
|
|
|
|
primary_key = CompositeKey("id_depot", "id_plugin")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipDocuments(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
brise = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
|
|
|
|
credits = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_publication = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
descriptif = TextField()
|
|
|
|
distant = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
extension = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
fichier = TextField()
|
|
|
|
hauteur = IntegerField(null=True)
|
|
|
|
id_document = BigAutoField()
|
|
|
|
id_vignette = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
largeur = IntegerField(null=True)
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
media = CharField(constraints=[SQL("DEFAULT 'file'")])
|
|
|
|
mode = CharField(constraints=[SQL("DEFAULT 'document'")], index=True)
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
taille = BigIntegerField(null=True)
|
|
|
|
titre = TextField()
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_documents"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipDocumentsLiens(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_document = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
vu = CharField(constraints=[SQL("DEFAULT 'non'")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_documents_liens"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_document", "id_objet", "objet"), True),)
|
|
|
|
primary_key = CompositeKey("id_document", "id_objet", "objet")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipEvenements(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
adresse = TextField()
|
|
|
|
attendee = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
date_creation = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_debut = DateTimeField(
|
2023-04-21 15:58:29 +02:00
|
|
|
constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")], index=True
|
|
|
|
)
|
2023-05-25 14:20:39 +02:00
|
|
|
date_fin = DateTimeField(
|
2023-04-21 15:58:29 +02:00
|
|
|
constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")], index=True
|
|
|
|
)
|
2023-05-25 14:20:39 +02:00
|
|
|
descriptif = TextField()
|
|
|
|
horaire = CharField(constraints=[SQL("DEFAULT 'oui'")])
|
|
|
|
id_article = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_evenement = BigAutoField()
|
|
|
|
id_evenement_source = BigIntegerField()
|
|
|
|
inscription = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
lieu = TextField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
notes = TextField()
|
|
|
|
origin = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
places = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
titre = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_evenements"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipEvenementsParticipants(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
email = TextField()
|
|
|
|
id_auteur = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_evenement = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_evenement_participant = BigAutoField()
|
|
|
|
nom = TextField()
|
|
|
|
reponse = CharField(constraints=[SQL("DEFAULT '?'")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_evenements_participants"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipForum(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
auteur = TextField()
|
|
|
|
date_heure = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_thread = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
email_auteur = TextField()
|
|
|
|
id_auteur = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_forum = BigAutoField()
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
id_parent = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_thread = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
ip = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
nom_site = TextField()
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
|
|
|
url_site = TextField()
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_forum"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("statut", "id_parent", "id_objet", "objet", "date_heure"), False),)
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipGroupesMots(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
comite = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
descriptif = TextField()
|
|
|
|
forum = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
id_groupe = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
minirezo = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
obligatoire = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
tables_liees = TextField()
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
|
|
|
unseul = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_groupes_mots"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipJobs(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
args = TextField()
|
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")], index=True)
|
|
|
|
descriptif = TextField()
|
|
|
|
fonction = CharField()
|
|
|
|
id_job = BigAutoField()
|
|
|
|
inclure = CharField()
|
|
|
|
md5args = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
priorite = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
status = IntegerField(constraints=[SQL("DEFAULT 1")], index=True)
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_jobs"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipJobsLiens(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_job = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_jobs_liens"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_job", "id_objet", "objet"), True),)
|
|
|
|
primary_key = CompositeKey("id_job", "id_objet", "objet")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipMeslettres(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
id_malettre = BigAutoField()
|
|
|
|
lang = CharField()
|
|
|
|
titre = TextField()
|
|
|
|
url_html = CharField(null=True)
|
|
|
|
url_txt = CharField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_meslettres"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipMessages(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date_fin = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_heure = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
destinataires = TextField()
|
|
|
|
id_auteur = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_message = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
rv = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
|
|
|
type = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_messages"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipMeta(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
impt = CharField(constraints=[SQL("DEFAULT 'oui'")])
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
nom = CharField(primary_key=True)
|
|
|
|
valeur = TextField(null=True)
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_meta"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipMots(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
descriptif = TextField()
|
|
|
|
extra = TextField(null=True)
|
|
|
|
id_groupe = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_mot = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
|
|
|
type = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_mots"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipMotsLiens(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_mot = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_mots_liens"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_mot", "id_objet", "objet"), True),)
|
|
|
|
primary_key = CompositeKey("id_mot", "id_objet", "objet")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipOrthoCache(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
lang = CharField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")], index=True)
|
|
|
|
mot = CharField()
|
|
|
|
ok = IntegerField()
|
|
|
|
suggest = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_ortho_cache"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("lang", "mot"), True),)
|
|
|
|
primary_key = CompositeKey("lang", "mot")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipOrthoDico(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_auteur = BigIntegerField()
|
|
|
|
lang = CharField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
mot = CharField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_ortho_dico"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("lang", "mot"), True),)
|
|
|
|
primary_key = CompositeKey("lang", "mot")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipPaquets(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
actif = CharField(constraints=[SQL("DEFAULT 'non'")])
|
|
|
|
attente = CharField(constraints=[SQL("DEFAULT 'non'")])
|
|
|
|
auteur = TextField()
|
|
|
|
branches_spip = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
compatibilite_spip = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
constante = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
copyright = TextField()
|
|
|
|
credit = TextField()
|
|
|
|
date_crea = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_modif = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
dependances = TextField()
|
|
|
|
description = TextField()
|
|
|
|
etat = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
etatnum = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
id_depot = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
id_paquet = BigAutoField()
|
|
|
|
id_plugin = BigIntegerField(index=True)
|
|
|
|
installe = CharField(constraints=[SQL("DEFAULT 'non'")])
|
|
|
|
licence = TextField()
|
|
|
|
lien_demo = TextField()
|
|
|
|
lien_dev = TextField()
|
|
|
|
lien_doc = TextField()
|
|
|
|
logo = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
maj_archive = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
maj_version = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
nbo_archive = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
nom_archive = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
obsolete = CharField(constraints=[SQL("DEFAULT 'non'")])
|
|
|
|
prefixe = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
procure = TextField()
|
|
|
|
recent = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
signature = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
src_archive = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
superieur = CharField(constraints=[SQL("DEFAULT 'non'")])
|
|
|
|
traductions = TextField()
|
|
|
|
version = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
version_base = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_paquets"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipPetitions(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
email_unique = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
id_article = BigIntegerField(constraints=[SQL("DEFAULT 0")], unique=True)
|
|
|
|
id_petition = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
message = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
site_obli = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
site_unique = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT 'publie'")])
|
|
|
|
texte = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_petitions"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipPlugins(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
branches_spip = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
categorie = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
compatibilite_spip = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
date_crea = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_modif = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
id_plugin = BigAutoField()
|
|
|
|
nom = TextField()
|
|
|
|
prefixe = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
slogan = TextField()
|
|
|
|
tags = TextField()
|
|
|
|
vmax = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_plugins"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipReferers(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
referer = CharField(null=True)
|
|
|
|
referer_md5 = BigAutoField()
|
|
|
|
visites = IntegerField()
|
|
|
|
visites_jour = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
visites_veille = IntegerField(constraints=[SQL("DEFAULT 0")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_referers"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipReferersArticles(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_article = IntegerField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
referer = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
referer_md5 = BigIntegerField(index=True)
|
|
|
|
visites = IntegerField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_referers_articles"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_article", "referer_md5"), True),)
|
|
|
|
primary_key = CompositeKey("id_article", "referer_md5")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipResultats(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id = IntegerField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
points = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
recherche = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
serveur = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
table_objet = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_resultats"
|
2023-04-21 15:07:49 +02:00
|
|
|
primary_key = False
|
|
|
|
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
class SpipRubriques(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
agenda = IntegerField(constraints=[SQL("DEFAULT 0")])
|
2023-05-24 12:04:42 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
2023-05-25 14:20:39 +02:00
|
|
|
date_tmp = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
descriptif = TextField()
|
|
|
|
extra = TextField(null=True)
|
|
|
|
id_parent = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_rubrique = BigAutoField()
|
|
|
|
id_secteur = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
id_trad = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
lang = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
langue_choisie = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
profondeur = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
statut_tmp = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
texte = TextField()
|
|
|
|
titre = TextField()
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_rubriques"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipSignatures(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
ad_email = TextField()
|
|
|
|
date_time = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
id_petition = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_signature = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
message = TextField()
|
|
|
|
nom_email = TextField()
|
|
|
|
nom_site = TextField()
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")], index=True)
|
|
|
|
url_site = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_signatures"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipSyndic(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_index = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
date_syndic = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
descriptif = TextField()
|
|
|
|
extra = TextField(null=True)
|
|
|
|
id_rubrique = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_secteur = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_syndic = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
miroir = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
moderation = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
nom_site = TextField()
|
|
|
|
oubli = CharField(constraints=[SQL("DEFAULT 'non'")], null=True)
|
|
|
|
resume = CharField(constraints=[SQL("DEFAULT 'oui'")], null=True)
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")])
|
|
|
|
syndication = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
url_site = TextField()
|
|
|
|
url_syndic = TextField()
|
2023-05-22 14:23:32 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_syndic"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("statut", "date_syndic"), False),)
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipSyndicArticles(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
descriptif = TextField()
|
|
|
|
id_syndic = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_syndic_article = BigAutoField()
|
|
|
|
lang = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
lesauteurs = TextField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
source = TextField()
|
|
|
|
statut = CharField(constraints=[SQL("DEFAULT '0'")], index=True)
|
|
|
|
tags = TextField()
|
|
|
|
titre = TextField()
|
|
|
|
url = TextField(index=True)
|
|
|
|
url_source = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_syndic_articles"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipTest(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
a = IntegerField(null=True)
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_test"
|
2023-04-21 15:07:49 +02:00
|
|
|
primary_key = False
|
|
|
|
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
class SpipTypesDocuments(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
descriptif = TextField()
|
|
|
|
extension = CharField(constraints=[SQL("DEFAULT ''")], primary_key=True)
|
|
|
|
inclus = CharField(constraints=[SQL("DEFAULT 'non'")], index=True)
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
media_defaut = CharField(constraints=[SQL("DEFAULT 'file'")])
|
|
|
|
mime_type = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
titre = TextField()
|
|
|
|
upload = CharField(constraints=[SQL("DEFAULT 'oui'")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_types_documents"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipUrls(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
id_objet = BigIntegerField()
|
|
|
|
id_parent = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
perma = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
segments = IntegerField(constraints=[SQL("DEFAULT 1")])
|
|
|
|
type = CharField(constraints=[SQL("DEFAULT 'article'")])
|
|
|
|
url = CharField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_urls"
|
2023-04-21 15:07:49 +02:00
|
|
|
indexes = (
|
2023-04-21 15:58:29 +02:00
|
|
|
(("id_parent", "url"), True),
|
|
|
|
(("type", "id_objet"), False),
|
2023-04-21 15:07:49 +02:00
|
|
|
)
|
2023-04-21 15:58:29 +02:00
|
|
|
primary_key = CompositeKey("id_parent", "url")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipVersions(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
champs = TextField()
|
|
|
|
date = DateTimeField(constraints=[SQL("DEFAULT '0000-00-00 00:00:00'")])
|
|
|
|
id_auteur = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
id_version = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")], index=True)
|
|
|
|
permanent = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
titre_version = TextField()
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_versions"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_version", "id_objet", "objet"), True),)
|
|
|
|
primary_key = CompositeKey("id_objet", "id_version", "objet")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipVersionsFragments(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
compress = IntegerField()
|
|
|
|
fragment = TextField(null=True)
|
|
|
|
id_fragment = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")])
|
|
|
|
version_max = IntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
version_min = IntegerField(constraints=[SQL("DEFAULT 0")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_versions_fragments"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_objet", "objet", "id_fragment", "version_min"), True),)
|
|
|
|
primary_key = CompositeKey("id_fragment", "id_objet", "objet", "version_min")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipVisites(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateField(primary_key=True)
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
visites = IntegerField(constraints=[SQL("DEFAULT 0")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_visites"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipVisitesArticles(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
date = DateField()
|
|
|
|
id_article = IntegerField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
visites = IntegerField(constraints=[SQL("DEFAULT 0")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_visites_articles"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("date", "id_article"), True),)
|
|
|
|
primary_key = CompositeKey("date", "id_article")
|
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipZones(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
descriptif = TextField()
|
|
|
|
id_zone = BigAutoField()
|
|
|
|
maj = DateTimeField(constraints=[SQL("DEFAULT current_timestamp()")])
|
|
|
|
privee = CharField(constraints=[SQL("DEFAULT 'non'")])
|
|
|
|
publique = CharField(constraints=[SQL("DEFAULT 'oui'")])
|
|
|
|
titre = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_zones"
|
2023-04-21 15:58:29 +02:00
|
|
|
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class SpipZonesLiens(BaseModel):
|
2023-05-25 14:20:39 +02:00
|
|
|
id_objet = BigIntegerField(constraints=[SQL("DEFAULT 0")])
|
|
|
|
id_zone = BigIntegerField(constraints=[SQL("DEFAULT 0")], index=True)
|
|
|
|
objet = CharField(constraints=[SQL("DEFAULT ''")])
|
2023-04-21 15:07:49 +02:00
|
|
|
|
|
|
|
class Meta:
|
2023-06-21 11:50:35 +02:00
|
|
|
table_name = "spip_zones_liens"
|
2023-04-21 15:58:29 +02:00
|
|
|
indexes = ((("id_zone", "id_objet", "objet"), True),)
|
|
|
|
primary_key = CompositeKey("id_objet", "id_zone", "objet")
|
2023-06-21 14:55:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
# class UnknownField(object):
|
|
|
|
# def __init__(self, *_, **__):
|
|
|
|
# pass
|