34 lines
791 B
TypeScript
34 lines
791 B
TypeScript
import {
|
|
ColumnType,
|
|
Generated,
|
|
Insertable,
|
|
JSONColumnType,
|
|
Selectable,
|
|
Updateable
|
|
} from 'kysely';
|
|
import { Order } from "@/hooks/useOrder";
|
|
|
|
export interface OrderState {
|
|
id: string;
|
|
orders: JSONColumnType<Order[]>;
|
|
completed: 0 | 1;
|
|
payment: string;
|
|
}
|
|
|
|
export type NewOrderState = Insertable<OrderState>;
|
|
export type OrderStateColumns = Selectable<OrderState>;
|
|
export type OrderStateUpdate = Updateable<OrderState>;
|
|
|
|
export interface OrderNumber {
|
|
id: string;
|
|
number: number;
|
|
}
|
|
|
|
export type NewOrderNumber = Insertable<OrderNumber>;
|
|
export type OrderNumberColumns = Selectable<OrderNumber>;
|
|
export type OrderNumberUpdate = Updateable<OrderNumber>;
|
|
|
|
export interface Database {
|
|
Order_State: OrderState;
|
|
Order_Number: OrderNumber;
|
|
} |