Initial commit
This commit is contained in:
commit
1e63e008af
48 changed files with 12715 additions and 0 deletions
6
utils/cookieSettings.ts
Normal file
6
utils/cookieSettings.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { CookieSerializeOptions } from "cookie-es";
|
||||
|
||||
export const cookieSettings: CookieSerializeOptions = {
|
||||
sameSite: "lax",
|
||||
maxAge: 60 * 60 * 24 * 30,
|
||||
};
|
68
utils/types/database.ts
Normal file
68
utils/types/database.ts
Normal file
|
@ -0,0 +1,68 @@
|
|||
export interface client {
|
||||
id: string,
|
||||
name: string | null,
|
||||
address: string | null,
|
||||
phone: string | null,
|
||||
email: string | null,
|
||||
}
|
||||
|
||||
export interface user {
|
||||
id: string,
|
||||
username: string,
|
||||
email: string,
|
||||
display_name?: string,
|
||||
}
|
||||
|
||||
export interface session {
|
||||
id: string,
|
||||
user: string,
|
||||
expiry_date: string,
|
||||
}
|
||||
|
||||
export interface imported_product {
|
||||
id: string,
|
||||
// order: string,
|
||||
name?: string,
|
||||
link: string,
|
||||
price_imported: string,
|
||||
price: string,
|
||||
}
|
||||
|
||||
export interface offer {
|
||||
id: string,
|
||||
name: string,
|
||||
description?: string,
|
||||
recommended_price?: string,
|
||||
}
|
||||
|
||||
export interface work {
|
||||
id: string,
|
||||
// order: string,
|
||||
offer: string|offer,
|
||||
price: string,
|
||||
notes: string,
|
||||
is_fulfilled: boolean,
|
||||
}
|
||||
|
||||
export interface order {
|
||||
id: string,
|
||||
client: client|string,
|
||||
user: user|string,
|
||||
is_draft: boolean,
|
||||
imported_products: imported_product[],
|
||||
work: work[],
|
||||
}
|
||||
|
||||
export interface work_template {
|
||||
id: string,
|
||||
// order_template: string,
|
||||
offer: string|offer,
|
||||
price: string,
|
||||
notes?: string,
|
||||
}
|
||||
|
||||
export interface order_template {
|
||||
id: string,
|
||||
name: string,
|
||||
description?: string,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue