First Commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import type { BUN_SQLITE_DatabaseSchemaType } from "@moduletrace/bun-sqlite/dist/types";
|
||||
|
||||
const schema: BUN_SQLITE_DatabaseSchemaType = {
|
||||
dbName: "test-db",
|
||||
tables: [
|
||||
{
|
||||
tableName: "users",
|
||||
fields: [
|
||||
{
|
||||
fieldName: "first_name",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
{
|
||||
fieldName: "last_name",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
{
|
||||
fieldName: "email",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
{
|
||||
fieldName: "image",
|
||||
dataType: "TEXT",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default schema;
|
||||
@@ -0,0 +1,24 @@
|
||||
export const BunSQLiteTables = [
|
||||
"users",
|
||||
] as const
|
||||
|
||||
export type BUN_SQLITE_TEST_DB_USERS = {
|
||||
/**
|
||||
* The unique identifier of the record.
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* The time when the record was created. (Unix Timestamp)
|
||||
*/
|
||||
created_at?: number;
|
||||
/**
|
||||
* The time when the record was updated. (Unix Timestamp)
|
||||
*/
|
||||
updated_at?: number;
|
||||
first_name?: string;
|
||||
last_name?: string;
|
||||
email?: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
export type BUN_SQLITE_TEST_DB_ALL_TYPEDEFS = BUN_SQLITE_TEST_DB_USERS
|
||||
Reference in New Issue
Block a user