This commit is contained in:
2026-10-15 04:37:38 +01:00
parent cb43d0616e
commit 6326c2bb26
18 changed files with 469 additions and 364 deletions
+184 -8
View File
@@ -5,13 +5,22 @@ const schema: BUN_MARIADB_DatabaseSchemaType = {
{
tableName: "blog_posts",
fields: [
{
fieldName: "id",
dataType: "BIGINT",
primaryKey: true,
autoIncrement: true,
notNullValue: true,
},
{
fieldName: "title",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "slug",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "excerpt",
@@ -20,35 +29,202 @@ const schema: BUN_MARIADB_DatabaseSchemaType = {
{
fieldName: "body",
dataType: "LONGTEXT",
html: true,
markdown: true,
},
{
json: true,
fieldName: "metadata",
dataType: "TEXT",
json: true,
nullValue: true,
},
{
dataType: "BOOLEAN",
fieldName: "published",
dataType: "TINYINT",
options: [0, 1],
defaultValue: "0",
},
{
fieldName: "meta_title",
dataType: "VARCHAR",
fieldName: "meta_title",
},
{
fieldName: "meta_description",
dataType: "TEXT",
fieldName: "meta_description",
},
{
fieldName: "date_created",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "date_created_code",
dataType: "BIGINT",
notNullValue: true,
},
{
fieldName: "date_created_timestamp",
dataType: "TIMESTAMP",
defaultValueLiteral: "CURRENT_TIMESTAMP",
nullValue: true,
},
{
fieldName: "date_updated",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "date_updated_code",
dataType: "BIGINT",
notNullValue: true,
},
{
fieldName: "date_updated_timestamp",
dataType: "TIMESTAMP",
defaultValueLiteral: "CURRENT_TIMESTAMP",
nullValue: true,
},
],
indexes: [],
uniqueConstraints: [],
},
{
tableName: "portfolio",
fields: [],
fields: [
{
fieldName: "id",
dataType: "BIGINT",
primaryKey: true,
autoIncrement: true,
notNullValue: true,
},
{
fieldName: "title",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "description",
dataType: "VARCHAR",
nullValue: true,
},
{
fieldName: "url",
dataType: "VARCHAR",
nullValue: true,
},
{
fieldName: "image",
dataType: "VARCHAR",
nullValue: true,
},
{
fieldName: "full_description",
dataType: "LONGTEXT",
nullValue: true,
html: true,
},
{
fieldName: "starting_date",
dataType: "VARCHAR",
nullValue: true,
},
{
fieldName: "completion_date",
dataType: "VARCHAR",
nullValue: true,
},
{
fieldName: "project_order",
dataType: "INT",
},
{
fieldName: "date_created",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "date_created_code",
dataType: "BIGINT",
notNullValue: true,
},
{
fieldName: "date_created_timestamp",
dataType: "TIMESTAMP",
defaultValueLiteral: "CURRENT_TIMESTAMP",
nullValue: true,
},
{
fieldName: "date_updated",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "date_updated_code",
dataType: "BIGINT",
notNullValue: true,
},
{
fieldName: "date_updated_timestamp",
dataType: "TIMESTAMP",
defaultValueLiteral: "CURRENT_TIMESTAMP",
nullValue: true,
},
],
indexes: [],
},
{
tableName: "documents",
fields: [],
fields: [
{
fieldName: "id",
dataType: "BIGINT",
primaryKey: true,
autoIncrement: true,
notNullValue: true,
},
{
fieldName: "project_name",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "html",
dataType: "LONGTEXT",
html: true,
cssFiles: [],
},
{
fieldName: "date_created",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "date_created_code",
dataType: "BIGINT",
notNullValue: true,
},
{
fieldName: "date_created_timestamp",
dataType: "TIMESTAMP",
defaultValueLiteral: "CURRENT_TIMESTAMP",
nullValue: true,
},
{
fieldName: "date_updated",
dataType: "VARCHAR",
notNullValue: true,
},
{
fieldName: "date_updated_code",
dataType: "BIGINT",
notNullValue: true,
},
{
fieldName: "date_updated_timestamp",
dataType: "TIMESTAMP",
defaultValueLiteral: "CURRENT_TIMESTAMP",
nullValue: true,
},
],
},
],
};
+39 -254
View File
@@ -1,21 +1,10 @@
export const BunMariaDBTables = [
"users",
"user_types",
"sso_login_codes",
"media",
"media_paradigms",
"events",
"event_media",
"user_media",
"locations",
"location_types",
"publications",
"publication_types",
"publication_media",
"variables",
"blog_posts",
"portfolio",
"documents",
] as const
export type BUN_MARIADB_SBF_USERS = {
export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS = {
/**
* The unique identifier of the record.
*/
@@ -28,223 +17,23 @@ export type BUN_MARIADB_SBF_USERS = {
* The time when the record was updated. (Unix Timestamp)
*/
updated_at?: number | "";
first_name?: string;
last_name?: string;
email?: string;
sbf_email?: string;
username?: string;
bio_summary?: string;
bio?: string;
archived?: 0 | 1 | "";
date_of_birth?: number | "";
location_id?: number | "";
}
export type BUN_MARIADB_SBF_USER_TYPES = {
/**
* 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 | "";
user_id?: number | "";
user_type?: "super_admin" | "admin" | "auditor" | "chairman" | "founder" | "vice_chairman" | "secretary" | "orphan" | "revoked" | "read_only" | "board_member" | "suspended" | "";
}
export type BUN_MARIADB_SBF_SSO_LOGIN_CODES = {
/**
* 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 | "";
user_id?: number | "";
code?: string;
}
export type BUN_MARIADB_SBF_MEDIA = {
/**
* 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 | "";
user_id?: number | "";
title?: string;
description?: string;
summary?: string;
media_type?: "image" | "video" | "document" | "";
media_write_path?: string;
media_thumbnail_write_path?: string;
mime_type?: string;
text_content?: string;
is_primary?: 0 | 1 | "";
is_rag_ingested?: 0 | 1 | "";
is_private?: 0 | 1 | "";
archived?: 0 | 1 | "";
}
export type BUN_MARIADB_SBF_MEDIA_PARADIGMS = {
/**
* 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 | "";
media_id?: number | "";
media_paradigm?: "user-profile-image" | "generic" | "event" | "location" | "publication" | "";
}
export type BUN_MARIADB_SBF_EVENTS = {
/**
* 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 | "";
user_id?: number | "";
title?: string;
slug?: string;
short_description?: string;
long_description?: string;
event_date?: number | "";
subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | "";
}
export type BUN_MARIADB_SBF_EVENT_MEDIA = {
/**
* 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 | "";
event_id?: number | "";
media_id?: number | "";
is_primary?: 0 | 1 | "";
}
export type BUN_MARIADB_SBF_USER_MEDIA = {
/**
* 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 | "";
user_id?: number | "";
media_id?: number | "";
}
export type BUN_MARIADB_SBF_LOCATIONS = {
/**
* 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 | "";
name?: string;
slug?: string;
address?: string;
city?: string;
state?: string;
country?: string;
description?: string;
user_id?: number | "";
media_id?: number | "";
subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | "";
is_primary?: 0 | 1 | "";
archived?: 0 | 1 | "";
}
export type BUN_MARIADB_SBF_LOCATION_TYPES = {
/**
* 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 | "";
location_id?: number | "";
location_type?: "orphanage" | "office" | "rural_community_branch" | "headquaters" | "";
}
export type BUN_MARIADB_SBF_PUBLICATIONS = {
/**
* 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 | "";
user_id?: number | "";
title?: string;
slug?: string;
excerpt?: string;
summary?: string;
body?: string;
body_plain?: string;
archived?: 0 | 1 | "";
subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | "";
metadata?: string;
published?: 0 | 1;
meta_title?: string;
meta_description?: string;
date_created?: string;
date_created_code?: number | "";
date_created_timestamp?: string;
date_updated?: string;
date_updated_code?: number | "";
date_updated_timestamp?: string;
}
export type BUN_MARIADB_SBF_PUBLICATION_TYPES = {
export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_PORTFOLIO = {
/**
* The unique identifier of the record.
*/
@@ -257,11 +46,23 @@ export type BUN_MARIADB_SBF_PUBLICATION_TYPES = {
* The time when the record was updated. (Unix Timestamp)
*/
updated_at?: number | "";
publication_id?: number | "";
publication_type?: "blog" | "article" | "case_study" | "";
title?: string;
description?: string;
url?: string;
image?: string;
full_description?: string;
starting_date?: string;
completion_date?: string;
project_order?: number | "";
date_created?: string;
date_created_code?: number | "";
date_created_timestamp?: string;
date_updated?: string;
date_updated_code?: number | "";
date_updated_timestamp?: string;
}
export type BUN_MARIADB_SBF_PUBLICATION_MEDIA = {
export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_DOCUMENTS = {
/**
* The unique identifier of the record.
*/
@@ -274,30 +75,14 @@ export type BUN_MARIADB_SBF_PUBLICATION_MEDIA = {
* The time when the record was updated. (Unix Timestamp)
*/
updated_at?: number | "";
publication_id?: number | "";
media_id?: number | "";
is_primary?: 0 | 1 | "";
project_name?: string;
html?: string;
date_created?: string;
date_created_code?: number | "";
date_created_timestamp?: string;
date_updated?: string;
date_updated_code?: number | "";
date_updated_timestamp?: string;
}
export type BUN_MARIADB_SBF_VARIABLES = {
/**
* 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 | "";
name?: "childrens_home_latest_event" | "";
short_description?: string;
long_description?: string;
media_id?: number | "";
user_id?: number | "";
subsidiary?: "childrens-home" | "youth-development" | "women-empowerment" | "";
}
export type BUN_MARIADB_SBF_ALL_TYPEDEFS = BUN_MARIADB_SBF_USERS & BUN_MARIADB_SBF_USER_TYPES & BUN_MARIADB_SBF_SSO_LOGIN_CODES & BUN_MARIADB_SBF_MEDIA & BUN_MARIADB_SBF_MEDIA_PARADIGMS & BUN_MARIADB_SBF_EVENTS & BUN_MARIADB_SBF_EVENT_MEDIA & BUN_MARIADB_SBF_USER_MEDIA & BUN_MARIADB_SBF_LOCATIONS & BUN_MARIADB_SBF_LOCATION_TYPES & BUN_MARIADB_SBF_PUBLICATIONS & BUN_MARIADB_SBF_PUBLICATION_TYPES & BUN_MARIADB_SBF_PUBLICATION_MEDIA & BUN_MARIADB_SBF_VARIABLES
export type BUN_MARIADB_DATASQUIREL_USER_2_TBENME_ALL_TYPEDEFS = BUN_MARIADB_DATASQUIREL_USER_2_TBENME_BLOG_POSTS & BUN_MARIADB_DATASQUIREL_USER_2_TBENME_PORTFOLIO & BUN_MARIADB_DATASQUIREL_USER_2_TBENME_DOCUMENTS