def load_db(**kwargs): # Get fields l_fields = Employe.l_index + Employe.l_fields() + Employe.l_hfields # Load table df = BaseModel.load_db(table_name='employe', l_fields=l_fields, columns=kwargs.get('columns', None)) return df
def declarative_base(): return BaseModel.declarative_base(clsname='Fournisseur', name=Fournisseur.table_name, dbcols=[ f.dbcol() for f in Fournisseur.l_index + Fournisseur.l_fields() ])
def load_db(**kwargs): l_fields = Devis.l_index + Devis.l_fields() + Devis.l_hfields # Load table df = BaseModel.load_db(table_name='devis', l_fields=l_fields, columns=kwargs.get('columns', None)) return df
def load_db(**kwargs): l_fields = Facture.l_index + Facture.l_fields() + Facture.l_hfields # Load table df = BaseModel.load_db(table_name='facture', l_fields=l_fields, columns=kwargs.get('columns', None)) return df
def load_db(**kwargs): l_fields = Client.l_index + Client.l_fields() + Client.l_hfields # Load table df = BaseModel.load_db(table_name='client', l_fields=l_fields, columns=kwargs.get('columns', None)) return df
def load_db(**kwargs): # Get fields l_fields = Chantier.l_index + Chantier.l_fields() + Chantier.l_hfields # Load table df = BaseModel.load_db(table_name='chantier', l_fields=l_fields, columns=kwargs.get('columns', None)) return df
def from_subindex_(d_subindex): d_index = BaseModel.from_subindex('contact', d_subindex, [f.name for f in Contact.l_index]) return Contact.from_index_(d_index)
def from_index_(d_index): # Series s = BaseModel.from_index('fournisseur', d_index) return Fournisseur( d_index, s.loc[[f.name for f in Fournisseur.l_fields()]].to_dict())
def declarative_base(): return BaseModel.declarative_base( clsname='Chantier', name=Chantier.table_name, dbcols=[f.dbcol() for f in Chantier.l_index + Chantier.l_fields()])
def from_index_(d_index): # Series s = BaseModel.from_index('client', d_index) return Client(d_index, s.loc[[f.name for f in Client.l_fields()]].to_dict())
def declarative_base(): return BaseModel.declarative_base( clsname='Client', name=Client.table_name, dbcols=[f.dbcol() for f in Client.l_index + Client.l_fields()])
def declarative_base(): return BaseModel.declarative_base( clsname='Facture', name=Facture.table_name, dbcols=[f.dbcol() for f in Facture.l_index + Facture.l_fields()])
def from_index_(d_index): # Series s = BaseModel.from_index('commande', d_index) return Commande(d_index, s.loc[[f.name for f in Commande.l_fields()]].to_dict())
def from_index_(d_index): # Series s = BaseModel.from_index(Affaire.table_name, d_index) return Affaire(d_index, s.loc[[f.name for f in Affaire.l_fields()]].to_dict())
def declarative_base(): return BaseModel.declarative_base( clsname='Devis', name=Devis.table_name, dbcols=[f.dbcol() for f in Devis.l_index + Devis.l_fields()] )
def from_groupindex_(d_groupindex): l_indices = BaseModel.from_groupindex('heure', d_groupindex, [f.name for f in Heure.l_index]) return [Heure.from_index_(d_index) for d_index in l_indices]
def from_index_(d_index): # Series s = BaseModel.from_index('chantier', d_index) return Chantier(d_index, s.loc[[f.name for f in Chantier.l_fields()]].to_dict())
def from_index_(d_index): # Series s = BaseModel.from_index('employe', d_index) return Employe(d_index, s.loc[[f.name for f in Employe.l_fields()]].to_dict())
def declarative_base(): return BaseModel.declarative_base( clsname='Employe', name=Employe.table_name, dbcols=[f.dbcol() for f in Employe.l_index + Employe.l_fields()] )
def from_subindex_(d_subindex): d_index = BaseModel.from_subindex('chantier', d_subindex, [f.name for f in Chantier.l_index]) return Chantier.from_index_(d_index)
def from_index_(d_index): # Series s = BaseModel.from_index(Devis.table_name, d_index) return Devis(d_index, s.loc[[f.name for f in Devis.l_fields()]].to_dict())
def from_index_(d_index): # Series s = BaseModel.from_index('facture', d_index) return Facture(d_index, s.loc[[f.name for f in Facture.l_fields()]].to_dict())
def declarative_base(): return BaseModel.declarative_base( clsname='Affaire', name=Affaire.table_name, dbcols=[f.dbcol() for f in Affaire.l_index + Affaire.l_fields()])
def declarative_base(): return BaseModel.declarative_base( clsname='Commande', name=Commande.table_name, dbcols=[f.dbcol() for f in Commande.l_index + Commande.l_fields()])