53 lines
2.0 KiB
Python
53 lines
2.0 KiB
Python
from app import db
|
|
|
|
class Entreprise(db.Model):
|
|
__tablename__ = "entreprises"
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
siret = db.Column(db.Text)
|
|
nom = db.Column(db.Text)
|
|
adresse = db.Column(db.Text)
|
|
codepostal = db.Column(db.Text)
|
|
ville = db.Column(db.Text)
|
|
pays = db.Column(db.Text)
|
|
contacts = db.relationship('EntrepriseContact', backref='entreprise', lazy='dynamic')
|
|
offres = db.relationship('EntrepriseOffre', backref='entreprise', lazy='dynamic')
|
|
|
|
class EntrepriseContact(db.Model):
|
|
__tablename__ = "entreprise_contact"
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
entreprise_id = db.Column(db.Integer, db.ForeignKey("entreprises.id"))
|
|
nom = db.Column(db.Text)
|
|
prenom = db.Column(db.Text)
|
|
telephone = db.Column(db.Text)
|
|
mail = db.Column(db.Text)
|
|
|
|
class EntrepriseOffre(db.Model):
|
|
__tablename__ = "entreprise_offre"
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
entreprise_id = db.Column(db.Integer, db.ForeignKey("entreprises.id"))
|
|
date_ajout = db.Column(db.DateTime(timezone=True), server_default=db.func.now())
|
|
intitule = db.Column(db.Text)
|
|
description = db.Column(db.Text)
|
|
type_offre = db.Column(db.Text)
|
|
missions = db.Column(db.Text)
|
|
duree = db.Column(db.Text)
|
|
|
|
class EntrepriseLog(db.Model):
|
|
__tablename__ = "entreprise_log"
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
date = db.Column(db.DateTime(timezone=True), server_default=db.func.now())
|
|
authenticated_user = db.Column(db.Text)
|
|
object = db.Column(db.Integer)
|
|
text = db.Column(db.Text)
|
|
|
|
class EntrepriseHistory(db.Model):
|
|
__tablename__ = "entreprise_history"
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
entreprise_id = db.Column(db.Integer, db.ForeignKey("entreprises.id"))
|
|
etudid = db.Column(db.Integer)
|
|
type_offre = db.Column(db.Text)
|
|
date_debut = db.Column(db.Date)
|
|
date_fin = db.Column(db.Date)
|
|
formation_text = db.Column(db.Text)
|
|
formation_scodoc = db.Column(db.Integer)
|