Migrate the rest of everything from rowid to id

This commit is contained in:
2024-10-25 16:37:37 +02:00
parent b89e27d5b4
commit 24546a4ef5
6 changed files with 36 additions and 37 deletions

View File

@@ -9,7 +9,7 @@
food: "",
amount: 0,
description: "",
rowid: 0,
id: 0,
date: "",
per100: 0,
energy: 0,

View File

@@ -6,7 +6,7 @@
let item: main.Weight = {
weight: 0,
rowid: 0,
id: 0,
date: ''
}
let weight: string | null = null

View File

@@ -33,7 +33,7 @@ export namespace main {
}
}
export class Food {
rowid: number;
id: number;
date: string;
food: string;
description: string;
@@ -47,7 +47,7 @@ export namespace main {
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.rowid = source["rowid"];
this.id = source["id"];
this.date = source["date"];
this.food = source["food"];
this.description = source["description"];
@@ -57,7 +57,7 @@ export namespace main {
}
}
export class FoodSearch {
rowid: number;
id: number;
date: string;
food: string;
description: string;
@@ -72,7 +72,7 @@ export namespace main {
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.rowid = source["rowid"];
this.id = source["id"];
this.date = source["date"];
this.food = source["food"];
this.description = source["description"];
@@ -267,7 +267,7 @@ export namespace main {
}
}
export class Weight {
rowid: number;
id: number;
date: string;
weight: number;
@@ -277,7 +277,7 @@ export namespace main {
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.rowid = source["rowid"];
this.id = source["id"];
this.date = source["date"];
this.weight = source["weight"];
}