/**
 * 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;
   }; */
   // @todo: that's not good, but required for admin options
   [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;
