refactoring id naming

This commit is contained in:
2021-01-18 20:24:57 +01:00
parent 47d918cdbf
commit 559678715b
4 changed files with 30 additions and 30 deletions

View File

@ -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,