|
|
|
|
@ -16,13 +16,13 @@ from peewee import *
|
|
|
|
|
db = SqliteDatabase('actes_princiers.db')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Archives(Model):
|
|
|
|
|
id_archives = IntegerField(primary_key=True)
|
|
|
|
|
archives_name = TextField()
|
|
|
|
|
class Institution(Model):
|
|
|
|
|
id_institution = IntegerField(primary_key=True)
|
|
|
|
|
institution_name = TextField()
|
|
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
database = db
|
|
|
|
|
db_table = 'Archives'
|
|
|
|
|
db_table = 'Institution'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class State(Model):
|
|
|
|
|
@ -55,7 +55,7 @@ class Diplo_type(Model):
|
|
|
|
|
class Document(Model):
|
|
|
|
|
id_document = IntegerField(primary_key=True)
|
|
|
|
|
doc_reference = TextField()
|
|
|
|
|
archives_doc = ForeignKeyField(Archives, backref='document')
|
|
|
|
|
institution_doc = ForeignKeyField(Institution, backref='document')
|
|
|
|
|
state_doc = ForeignKeyField(State, backref='document')
|
|
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|