This commit is contained in:
2025-09-09 00:10:53 +03:00
parent 38f2a05107
commit 204fc092d7
239 changed files with 22447 additions and 9536 deletions

View File

@@ -30,10 +30,6 @@ class EntrancesService {
"house_id": Number(row.house_id),
"entrance_number": Number(row.entrance_number),
"title": row.title,
"points": JSON.parse(row.points),
"points_number": JSON.parse(row.points_number),
"floors_quantity": row.floors_quantity,
"apartments_quantity": row.apartments_quantity,
"description": row.description,
"created_at": Number(row.created_at),
"updated_at": Number(row.updated_at),
@@ -65,29 +61,19 @@ class EntrancesService {
house_id,
entrance_number,
title,
points,
points_number,
floors_quantity,
apartments_quantity,
description,
created_at,
updated_at
created_at
)
VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
(?, ?, ?, ?, ?)
`;
db.run(sql, [
house_id,
Number(data.entrance_number),
data.title,
JSON.stringify(data.points),
JSON.stringify(data.points_number),
data.floors_quantity,
data.apartments_quantity,
data.description,
Math.floor(new Date(Date.now()).getTime()),
Math.floor(new Date(Date.now()).getTime()),
Math.floor(new Date(Date.now()).getTime())
], function(err) {
if (err) {
console.error(err.message);
@@ -108,10 +94,6 @@ class EntrancesService {
entrance
SET
title = ?,
points = ?,
points_number = ?,
floors_quantity = ?,
apartments_quantity = ?,
description = ?,
updated_at = ?
WHERE