test: add unit tests for DAOs
This commit is contained in:
@@ -1,2 +1,37 @@
|
||||
export type QueryResult<T> = { rows: T[]};
|
||||
export type BatchOp = [string, any[]];
|
||||
import { Chain } from '../models/Chain';
|
||||
import { Establishment } from '../models/Establishment';
|
||||
|
||||
export type QueryResult<T> = { rows: T[] };
|
||||
export type BatchOp = [string, any[]];
|
||||
|
||||
export type PurchaseQueryResult = {
|
||||
id: number;
|
||||
price: number;
|
||||
quantity: number;
|
||||
date: number;
|
||||
establishment_id: number;
|
||||
product_id: number;
|
||||
barcode: string;
|
||||
product_image: string | null;
|
||||
product_name: string;
|
||||
address: string;
|
||||
chain_id: number;
|
||||
chain_image: string | null;
|
||||
chain_name: string | null;
|
||||
};
|
||||
|
||||
export type ProductEstablishmentQueryResult = {
|
||||
address: string;
|
||||
barcode: string;
|
||||
chain_id: number;
|
||||
chain_image: string | null;
|
||||
chain_name: string | null;
|
||||
establishment_id: number;
|
||||
id: number;
|
||||
product_id: number;
|
||||
product_image: string | null;
|
||||
product_name: string;
|
||||
};
|
||||
|
||||
export type EstablishmentQueryResult = Omit<Establishment, 'chain'> &
|
||||
Omit<Chain, 'id'> & { id: number; chain_id: number };
|
||||
|
||||
Reference in New Issue
Block a user