mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
30 lines
625 B
TypeScript
30 lines
625 B
TypeScript
/**
|
|
* These are package global defaults.
|
|
*/
|
|
import type { Generated } from "kysely";
|
|
|
|
export type PrimaryFieldType<IdType = number | string> = IdType | Generated<IdType>;
|
|
|
|
export interface AppEntity<IdType = number | string> {
|
|
id: PrimaryFieldType<IdType>;
|
|
}
|
|
|
|
export interface DB {
|
|
// make sure to make unknown as "any"
|
|
[key: string]: {
|
|
id: PrimaryFieldType;
|
|
[key: string]: any;
|
|
};
|
|
}
|
|
|
|
export const config = {
|
|
server: {
|
|
default_port: 1337,
|
|
// resetted to root for now, bc bundling with vite
|
|
assets_path: "/",
|
|
},
|
|
data: {
|
|
default_primary_field: "id",
|
|
},
|
|
} as const;
|