feat(persistance): add db models
This commit is contained in:
3
src/app/models/db/DBChain.ts
Normal file
3
src/app/models/db/DBChain.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import { Chain } from '../Chain';
|
||||||
|
|
||||||
|
export class DBChain extends Chain {}
|
||||||
3
src/app/models/db/DBEstablishment.ts
Normal file
3
src/app/models/db/DBEstablishment.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export class DBEstablishment {
|
||||||
|
constructor(public address: string, public chain_id: number, public id?: number) {}
|
||||||
|
}
|
||||||
3
src/app/models/db/DBProduct.ts
Normal file
3
src/app/models/db/DBProduct.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import { Product } from '../Product';
|
||||||
|
|
||||||
|
export class DBProduct extends Product {}
|
||||||
3
src/app/models/db/DBProductEstablishment.ts
Normal file
3
src/app/models/db/DBProductEstablishment.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export class DBProductEstablishment {
|
||||||
|
constructor(public product_id: number, public establishment_id: number, public id?: number) {}
|
||||||
|
}
|
||||||
10
src/app/models/db/DBPurchase.ts
Normal file
10
src/app/models/db/DBPurchase.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export class DBPurchase {
|
||||||
|
constructor(
|
||||||
|
public establishment_id: number,
|
||||||
|
public product_id: number,
|
||||||
|
public date: number,
|
||||||
|
public price = 0,
|
||||||
|
public quantity = 1,
|
||||||
|
public id?: number
|
||||||
|
) {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user