Ejemplo n.º 1
0
class FieldType(db.Model):
    __bind_key__ = 'lac'
    __tablename__ = 'fieldtype'
    id = db.Column(db.Integer, primary_key=True)
    type = db.Column(db.String(80))

    fields = db.relationship('Field', backref='fieldtype', lazy='dynamic')
Ejemplo n.º 2
0
class LDAPAttribute(db.Model):
    __bind_key__ = 'lac'
    __tablename__ = 'ldapattribute'
    id = db.Column(db.Integer, primary_key=True)
    label = db.Column(db.String(50), unique=True)

    ldapobjectclassattributes = db.relationship("LDAPObjectClassAttribute",
                                                backref="ldapattribute",
                                                lazy='dynamic')

    fields = db.relationship('Field', backref='ldapattribute', lazy='dynamic')

    def __init__(self, label):
        self.label = label

    def __repr__(self):
        return '<LDAPAttribute %r>' % self.label
Ejemplo n.º 3
0
class C4Qualite(db.Model):
    __bind_key__ = 'gescli'
    __tablename__ = 'QUALITE'
    code_qualite = db.Column(db.String(8), primary_key=True)
    libelle_qualite = db.Column(db.String(50))
    personnes = db.relationship('C4Personne',
                                backref='qualite',
                                lazy='dynamic')
Ejemplo n.º 4
0
class C4Comite(db.Model):
    __bind_key__ = 'gescli'
    __tablename__ = 'COMITE'
    code_comite = db.Column(db.Integer, primary_key=True)
    ct = db.Column(db.String(8))
    intitule_comite = db.Column(db.String(80))
    ressources = db.relationship('C4Ressource',
                                 backref='comite',
                                 lazy='dynamic')
Ejemplo n.º 5
0
class Page(db.Model):
    __bind_key__ = 'lac'
    __tablename__ = 'page'
    id = db.Column(db.Integer, primary_key=True)
    label = db.Column(db.String(50), unique=True)
    description = db.Column(db.String(80))

    fields = db.relationship("Field", backref="page", lazy='dynamic')

    pageobjectclasses = db.relationship("PageObjectClass",
                                        backref="page",
                                        lazy='dynamic')

    def __init__(self, label, description):
        self.label = label
        self.description = description

    def __repr__(self):
        return '<Page %r>' % self.label
Ejemplo n.º 6
0
class C4Adresse(db.Model):
    __bind_key__ = 'gescli'
    __tablename__ = 'ADRESSE'
    code_adresse = db.Column(db.Integer, primary_key=True)
    laboratoire_adresse = db.Column(db.String(50))
    organisme_adresse = db.Column(db.String(50))
    adresse1_adresse = db.Column(db.String(50))
    adresse2_adresse = db.Column(db.String(50))
    cdpostal_adresse = db.Column(db.String(10))
    ville_adresse = db.Column(db.String(50))
    pays_adresse = db.Column(db.String(20))
    personnes = db.relationship('C4Personne',
                                backref='adresse',
                                lazy='dynamic')
Ejemplo n.º 7
0
class C4Personne(db.Model):
    __bind_key__ = 'gescli'
    __tablename__ = 'PERSONNE'
    code_personne = db.Column(db.Integer, primary_key=True)
    nom_personne = db.Column(db.String(30))
    prenom_personne = db.Column(db.String(30))
    code_adresse = db.Column(db.Integer, db.ForeignKey('ADRESSE.code_adresse'))
    code_qualite = db.Column(db.String(8),
                             db.ForeignKey('QUALITE.code_qualite'))
    code_profil = db.Column(db.String(15), db.ForeignKey('PROFIL.code_profil'))
    telephone_personne = db.Column(db.String(20))
    fax_personne = db.Column(db.String(20))
    bal_personne = db.Column(db.String(50))
    projets = db.relationship('C4Projet', backref='personne', lazy='dynamic')
Ejemplo n.º 8
0
class LDAPObjectType(db.Model):
    __bind_key__ = 'lac'
    __tablename__ = 'ldapobjecttype'
    id = db.Column(db.Integer, primary_key=True)
    label = db.Column(db.String(50), unique=True)
    description = db.Column(db.String(50))
    ranges = db.Column(db.String(200))
    apply_to = db.Column(db.String(20))
    last_used_id = db.Column(db.Integer)
    ppolicy = db.Column(db.String(50))

    ldapobjecttypeobjectclasses = db.relationship("LDAPObjectTypeObjectClass",
                                                  backref="ldapobjecttype",
                                                  lazy='dynamic')
Ejemplo n.º 9
0
class User(db.Model):
    __bind_key__ = 'lac'
    __tablename__ = 'user'
    id = db.Column(db.Integer, primary_key=True)
    uid = db.Column(db.String(200))
    uid_number = db.Column(db.Integer, unique=True)
    firstname = db.Column(db.String(200))
    lastname = db.Column(db.String(200))
    email = db.Column(db.String(200))
    phone_number = db.Column(db.String(20))
    deletion_timestamp = db.Column(db.Date())
    binds = db.relationship('UserBind',
                            backref="user",
                            lazy='dynamic',
                            order_by='desc(UserBind.time)')
Ejemplo n.º 10
0
class C4Profil(db.Model):
    __bind_key__ = 'gescli'
    __tablename__ = 'PROFIL'
    code_profil = db.Column(db.String(15), primary_key=True)
    libelle_profil = db.Column(db.String(50))
    personnes = db.relationship('C4Personne', backref='profil', lazy='dynamic')