commercial unit area and overhead stuff
This commit is contained in:
@ -813,6 +813,7 @@ SELECT
|
||||
id
|
||||
,description
|
||||
,premise
|
||||
,area
|
||||
FROM commercial_premise_t
|
||||
ORDER BY
|
||||
premise
|
||||
@ -827,21 +828,25 @@ def insert_commercial_premise(user, token_info, **args):
|
||||
body = args["body"]
|
||||
v_description = body["description"]
|
||||
v_premise = body["premise"]
|
||||
v_area = body["area"]
|
||||
return dbInsert(user, token_info, {
|
||||
"statement": """
|
||||
INSERT INTO commercial_premise_t
|
||||
(
|
||||
description
|
||||
,premise
|
||||
,area
|
||||
) VALUES (
|
||||
%s
|
||||
,%s
|
||||
,%s
|
||||
)
|
||||
RETURNING *
|
||||
""",
|
||||
"params": [
|
||||
v_description
|
||||
,v_premise
|
||||
,v_area
|
||||
]
|
||||
})
|
||||
except KeyError as e:
|
||||
@ -856,6 +861,7 @@ SELECT
|
||||
id
|
||||
,description
|
||||
,premise
|
||||
,area
|
||||
FROM commercial_premise_t
|
||||
WHERE id = %s
|
||||
""",
|
||||
@ -868,18 +874,21 @@ def update_commercial_premise(user, token_info, commercial_premiseId=None, **arg
|
||||
body = args["body"]
|
||||
v_description = body["description"]
|
||||
v_premise = body["premise"]
|
||||
v_area = body["area"]
|
||||
return dbUpdate(user, token_info, {
|
||||
"statement": """
|
||||
UPDATE commercial_premise_t
|
||||
SET
|
||||
description = %s
|
||||
,premise = %s
|
||||
,area = %s
|
||||
WHERE id = %s
|
||||
RETURNING *
|
||||
""",
|
||||
"params": [
|
||||
v_description,
|
||||
v_premise,
|
||||
v_area,
|
||||
commercial_premiseId
|
||||
]
|
||||
})
|
||||
@ -895,6 +904,7 @@ SELECT
|
||||
id
|
||||
,description
|
||||
,premise
|
||||
,area
|
||||
FROM commercial_premise_t
|
||||
WHERE premise = %s
|
||||
ORDER BY
|
||||
|
@ -1714,6 +1714,9 @@ components:
|
||||
premise:
|
||||
type: integer
|
||||
nullable: true
|
||||
area:
|
||||
type: number
|
||||
nullable: true
|
||||
tenancy:
|
||||
description: tenancy
|
||||
type: object
|
||||
|
Reference in New Issue
Block a user