(()=>{var t={};t.id=170,t.ids=[170],t.modules={1463:(t,e,r)=>{"use strict";r.d(e,{U9:()=>n});var s=r(49930);function n(t){return(0,s.ll)`count(${t||s.ll.raw("*")})`.mapWith(Number)}},3295:t=>{"use strict";t.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:t=>{"use strict";t.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33971:(t,e,r)=>{"use strict";r.r(e),r.d(e,{patchFetch:()=>x,routeModule:()=>c,serverHooks:()=>g,workAsyncStorage:()=>m,workUnitAsyncStorage:()=>N});var s={};r.r(s),r.d(s,{GET:()=>p});var n=r(96559),a=r(48088),o=r(37719),l=r(32190),i=r(63095),u=r(39300),d=r(1463);async function p(t){let e=await (0,i.A)().select({count:(0,d.U9)()}).from(u.templates);return l.NextResponse.json({data:e[0].count,success:!0})}let c=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/[locale]/api/template/get-total-template/route",pathname:"/[locale]/api/template/get-total-template",filename:"route",bundlePath:"app/[locale]/api/template/get-total-template/route"},resolvedPagePath:"E:\\xampp01\\htdocs\\wx-saas\\timynote\\app\\[locale]\\api\\template\\get-total-template\\route.tsx",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:m,workUnitAsyncStorage:N,serverHooks:g}=c;function x(){return(0,o.patchFetch)({workAsyncStorage:m,workUnitAsyncStorage:N})}},39300:(t,e,r)=>{"use strict";r.r(e),r.d(e,{categories:()=>d,medias:()=>u,metaRelations:()=>N,options:()=>i,posts:()=>p,tags:()=>c,templates:()=>m});var s=r(81598),n=r(70932),a=r(22077),o=r(89283),l=r(49930);let i=(0,s.D)("options",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),optionName:(0,a.sH)("option_name").default().notNull(),optionValue:(0,a.sH)("option_value").notNull()}),u=(0,s.D)("medias",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}),name:(0,o.Qq)("name").notNull(),description:(0,o.Qq)("description"),extension:(0,o.Qq)("extension").default("NA").notNull(),url:(0,o.Qq)("url").notNull(),timeCreated:(0,a.sH)("time_created").default((0,l.ll)`(CURRENT_TIMESTAMP)`),timeModified:(0,a.sH)("time_modified").default((0,l.ll)`(CURRENT_TIMESTAMP)`)}),d=(0,s.D)("categories",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),category:(0,a.sH)("category").notNull(),description:(0,a.sH)("description").notNull(),slug:(0,a.sH)("slug").notNull(),parent:(0,a.sH)("parent").notNull()}),p=(0,s.D)("posts",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,o.Qq)("title").notNull(),content:(0,a.sH)("content"),slug:(0,a.sH)("slug").notNull(),timeCreated:(0,a.sH)("time_created").default((0,l.ll)`(CURRENT_TIMESTAMP)`).notNull(),timeModified:(0,a.sH)("time_modified").default((0,l.ll)`(NULL)`),status:(0,a.sH)("status").default("draft").notNull(),isTop:(0,a.sH)("is_top").notNull(),excerpt:(0,o.Qq)("excerpt"),featureImg:(0,o.Qq)("feature_img")}),c=(0,s.D)("tags",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),tag:(0,a.sH)("tag").notNull(),description:(0,a.sH)("description").notNull(),slug:(0,a.sH)("slug").notNull()}),m=(0,s.D)("templates",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,o.Qq)("title").notNull(),content:(0,a.sH)("content").notNull()}),N=(0,s.D)("meta_relations",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),metaId:(0,a.sH)("meta_id"),type:(0,a.sH)("type"),postId:(0,a.sH)("post_id").references(()=>p.id)})},44870:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:t=>{"use strict";t.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63095:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var s=r(87550),n=r.n(s),a=r(46267),o=r(39300);let l=()=>{let t=new(n())("./contents/data.db");return(0,a.f)(t,{schema:o})}},78335:()=>{},87550:t=>{"use strict";t.exports=require("better-sqlite3")},96487:()=>{}};var e=require("../../../../../webpack-runtime.js");e.C(t);var r=t=>e(e.s=t),s=e.X(0,[4447,580,902],()=>r(33971));module.exports=s})();