- Migrated all pages from Next.js to Astro - Added PDPA-compliant Privacy Policy (Thai) - Added PDPA-compliant Terms & Conditions (Thai) - Added Cookie Policy with disclosure (Thai) - Implemented cookie consent banner (client-side) - Integrated Umami Analytics placeholder - Blog system with 3 posts - Optimized Docker configuration for production - Static site build (184KB, 11 pages) - Ready for Easypanel deployment Backup: /Users/kunthawatgreethong/Gitea/dealplustech-backup-nextjs-20260309.tar.gz
113 lines
1.5 KiB
JavaScript
113 lines
1.5 KiB
JavaScript
import { sql as _sql } from "drizzle-orm";
|
|
function createColumn(type, schema) {
|
|
return {
|
|
type,
|
|
/**
|
|
* @internal
|
|
*/
|
|
schema
|
|
};
|
|
}
|
|
const column = {
|
|
number: (opts = {}) => {
|
|
return createColumn("number", opts);
|
|
},
|
|
boolean: (opts = {}) => {
|
|
return createColumn("boolean", opts);
|
|
},
|
|
text: (opts = {}) => {
|
|
return createColumn("text", opts);
|
|
},
|
|
date(opts = {}) {
|
|
return createColumn("date", opts);
|
|
},
|
|
json(opts = {}) {
|
|
return createColumn("json", opts);
|
|
}
|
|
};
|
|
function defineTable(userConfig) {
|
|
return userConfig;
|
|
}
|
|
function defineDb(userConfig) {
|
|
return userConfig;
|
|
}
|
|
const NOW = _sql`CURRENT_TIMESTAMP`;
|
|
const TRUE = _sql`TRUE`;
|
|
const FALSE = _sql`FALSE`;
|
|
import {
|
|
and,
|
|
asc,
|
|
avg,
|
|
avgDistinct,
|
|
between,
|
|
count,
|
|
countDistinct,
|
|
desc,
|
|
eq,
|
|
exists,
|
|
gt,
|
|
gte,
|
|
ilike,
|
|
inArray,
|
|
isNotNull,
|
|
isNull,
|
|
like,
|
|
lt,
|
|
lte,
|
|
max,
|
|
min,
|
|
ne,
|
|
not,
|
|
notBetween,
|
|
notExists,
|
|
notIlike,
|
|
notInArray,
|
|
or,
|
|
sql,
|
|
sum,
|
|
sumDistinct
|
|
} from "drizzle-orm";
|
|
import { alias } from "drizzle-orm/sqlite-core";
|
|
import { isDbError } from "./utils.js";
|
|
export {
|
|
FALSE,
|
|
NOW,
|
|
TRUE,
|
|
alias,
|
|
and,
|
|
asc,
|
|
avg,
|
|
avgDistinct,
|
|
between,
|
|
column,
|
|
count,
|
|
countDistinct,
|
|
defineDb,
|
|
defineTable,
|
|
desc,
|
|
eq,
|
|
exists,
|
|
gt,
|
|
gte,
|
|
ilike,
|
|
inArray,
|
|
isDbError,
|
|
isNotNull,
|
|
isNull,
|
|
like,
|
|
lt,
|
|
lte,
|
|
max,
|
|
min,
|
|
ne,
|
|
not,
|
|
notBetween,
|
|
notExists,
|
|
notIlike,
|
|
notInArray,
|
|
or,
|
|
sql,
|
|
sum,
|
|
sumDistinct
|
|
};
|