refactoring id naming
This commit is contained in:
16
Mieter.py
16
Mieter.py
@ -3,10 +3,10 @@ from dbpool import getConnection, getMany, getOne
|
||||
def get_mieters():
|
||||
return getMany("""
|
||||
SELECT m.id as id,
|
||||
o.id as objekt_id,
|
||||
w.id as wohnung_id,
|
||||
w.shortname as wohnung,
|
||||
o.shortname as objekt,
|
||||
o.id as objekt,
|
||||
w.id as wohnung,
|
||||
w.shortname as wohnung_shortname,
|
||||
o.shortname as objekt_shortname,
|
||||
COALESCE(m.anrede, '-') as anrede,
|
||||
COALESCE(m.vorname, '-') as vorname,
|
||||
m.nachname as nachname,
|
||||
@ -24,10 +24,10 @@ SELECT m.id as id,
|
||||
def get_mieter(id=None):
|
||||
return getOne("""
|
||||
SELECT m.id as id,
|
||||
o.id as objekt_id,
|
||||
w.id as wohnung_id,
|
||||
w.shortname as wohnung,
|
||||
o.shortname as objekt,
|
||||
o.id as objekt,
|
||||
w.id as wohnung,
|
||||
w.shortname as wohnung_shortname,
|
||||
o.shortname as objekt_shortname,
|
||||
COALESCE(m.anrede, '-') as anrede,
|
||||
COALESCE(m.vorname, '-') as vorname,
|
||||
m.nachname as nachname,
|
||||
|
Reference in New Issue
Block a user