@vitnode/blog 1.2.0-canary.74 → 1.2.0-canary.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/modules/admin/admin.module.d.ts +180 -177
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +2 -1
- package/dist/src/api/modules/admin/admin.module.js.map +1 -0
- package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts +80 -77
- package/dist/src/api/modules/admin/categories/categories.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/categories/categories.admin.module.js +2 -1
- package/dist/src/api/modules/admin/categories/categories.admin.module.js.map +1 -0
- package/dist/src/api/modules/admin/categories/routes/create.route.d.ts +34 -31
- package/dist/src/api/modules/admin/categories/routes/create.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/categories/routes/create.route.js +2 -1
- package/dist/src/api/modules/admin/categories/routes/create.route.js.map +1 -0
- package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts +18 -15
- package/dist/src/api/modules/admin/categories/routes/delete.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/categories/routes/delete.route.js +2 -1
- package/dist/src/api/modules/admin/categories/routes/delete.route.js.map +1 -0
- package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts +38 -35
- package/dist/src/api/modules/admin/categories/routes/edit.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/categories/routes/edit.route.js +2 -1
- package/dist/src/api/modules/admin/categories/routes/edit.route.js.map +1 -0
- package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts +93 -90
- package/dist/src/api/modules/admin/posts/posts.admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/posts/posts.admin.module.js +2 -1
- package/dist/src/api/modules/admin/posts/posts.admin.module.js.map +1 -0
- package/dist/src/api/modules/admin/posts/routes/create.route.d.ts +44 -41
- package/dist/src/api/modules/admin/posts/routes/create.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/posts/routes/create.route.js +2 -1
- package/dist/src/api/modules/admin/posts/routes/create.route.js.map +1 -0
- package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts +18 -15
- package/dist/src/api/modules/admin/posts/routes/delete.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/posts/routes/delete.route.js +2 -1
- package/dist/src/api/modules/admin/posts/routes/delete.route.js.map +1 -0
- package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts +43 -40
- package/dist/src/api/modules/admin/posts/routes/edit.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/posts/routes/edit.route.js +2 -1
- package/dist/src/api/modules/admin/posts/routes/edit.route.js.map +1 -0
- package/dist/src/api/modules/categories/categories.module.d.ts +64 -61
- package/dist/src/api/modules/categories/categories.module.d.ts.map +1 -1
- package/dist/src/api/modules/categories/categories.module.js +2 -1
- package/dist/src/api/modules/categories/categories.module.js.map +1 -0
- package/dist/src/api/modules/categories/routes/get.route.d.ts +45 -42
- package/dist/src/api/modules/categories/routes/get.route.d.ts.map +1 -1
- package/dist/src/api/modules/categories/routes/get.route.js +2 -1
- package/dist/src/api/modules/categories/routes/get.route.js.map +1 -0
- package/dist/src/api/modules/categories/test.route.d.ts +23 -20
- package/dist/src/api/modules/categories/test.route.d.ts.map +1 -1
- package/dist/src/api/modules/categories/test.route.js +2 -1
- package/dist/src/api/modules/categories/test.route.js.map +1 -0
- package/dist/src/api/modules/posts/posts.module.d.ts +54 -51
- package/dist/src/api/modules/posts/posts.module.d.ts.map +1 -1
- package/dist/src/api/modules/posts/posts.module.js +2 -1
- package/dist/src/api/modules/posts/posts.module.js.map +1 -0
- package/dist/src/api/modules/posts/routes/get.route.d.ts +64 -61
- package/dist/src/api/modules/posts/routes/get.route.d.ts.map +1 -1
- package/dist/src/api/modules/posts/routes/get.route.js +2 -1
- package/dist/src/api/modules/posts/routes/get.route.js.map +1 -0
- package/dist/src/config.api.d.ts +4 -1
- package/dist/src/config.api.d.ts.map +1 -1
- package/dist/src/config.api.js +2 -1
- package/dist/src/config.api.js.map +1 -0
- package/dist/src/config.d.ts +4 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +2 -1
- package/dist/src/config.js.map +1 -0
- package/dist/src/const.d.ts +5 -2
- package/dist/src/const.d.ts.map +1 -1
- package/dist/src/const.js +2 -1
- package/dist/src/const.js.map +1 -0
- package/dist/src/database/categories.d.ts +98 -95
- package/dist/src/database/categories.d.ts.map +1 -1
- package/dist/src/database/categories.js +2 -1
- package/dist/src/database/categories.js.map +1 -0
- package/dist/src/database/index.d.ts +4 -4
- package/dist/src/database/index.js +1 -1
- package/dist/src/database/posts.d.ts +132 -129
- package/dist/src/database/posts.d.ts.map +1 -1
- package/dist/src/database/posts.js +2 -1
- package/dist/src/database/posts.js.map +1 -0
- package/dist/src/database/relations.d.ts +7 -4
- package/dist/src/database/relations.d.ts.map +1 -1
- package/dist/src/database/relations.js +2 -1
- package/dist/src/database/relations.js.map +1 -0
- package/dist/src/emails/test-template.d.ts +20 -18
- package/dist/src/emails/test-template.d.ts.map +1 -1
- package/dist/src/emails/test-template.js +2 -1
- package/dist/src/emails/test-template.js.map +1 -0
- package/dist/src/routes/admin/blog/categories/page.d.ts +7 -5
- package/dist/src/routes/admin/blog/categories/page.d.ts.map +1 -1
- package/dist/src/routes/admin/blog/categories/page.js +2 -1
- package/dist/src/routes/admin/blog/categories/page.js.map +1 -0
- package/dist/src/routes/admin/blog/posts/page.d.ts +7 -5
- package/dist/src/routes/admin/blog/posts/page.d.ts.map +1 -1
- package/dist/src/routes/admin/blog/posts/page.js +2 -1
- package/dist/src/routes/admin/blog/posts/page.js.map +1 -0
- package/dist/src/views/admin/categories/actions/actions.d.ts +4 -1
- package/dist/src/views/admin/categories/actions/actions.d.ts.map +1 -1
- package/dist/src/views/admin/categories/actions/actions.js +2 -1
- package/dist/src/views/admin/categories/actions/actions.js.map +1 -0
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts +8 -5
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.d.ts.map +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.js +2 -1
- package/dist/src/views/admin/categories/actions/create-edit/create-edit.js.map +1 -0
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.d.ts +10 -7
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.js +2 -1
- package/dist/src/views/admin/categories/actions/create-edit/mutation-api.js.map +1 -0
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.d.ts +7 -4
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.d.ts.map +1 -1
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.js +2 -1
- package/dist/src/views/admin/categories/table/actions/delete/delete-action.js.map +1 -0
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.d.ts +5 -2
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.js +2 -1
- package/dist/src/views/admin/categories/table/actions/delete/mutation-api.js.map +1 -0
- package/dist/src/views/admin/categories/table/actions/edit-action.d.ts +8 -5
- package/dist/src/views/admin/categories/table/actions/edit-action.d.ts.map +1 -1
- package/dist/src/views/admin/categories/table/actions/edit-action.js +2 -1
- package/dist/src/views/admin/categories/table/actions/edit-action.js.map +1 -0
- package/dist/src/views/admin/categories/table/categories-admin-view.d.ts +5 -2
- package/dist/src/views/admin/categories/table/categories-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/categories/table/categories-admin-view.js +2 -1
- package/dist/src/views/admin/categories/table/categories-admin-view.js.map +1 -0
- package/dist/src/views/admin/posts/actions/actions.d.ts +4 -1
- package/dist/src/views/admin/posts/actions/actions.d.ts.map +1 -1
- package/dist/src/views/admin/posts/actions/actions.js +2 -1
- package/dist/src/views/admin/posts/actions/actions.js.map +1 -0
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.d.ts +8 -5
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.d.ts.map +1 -1
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.js +2 -1
- package/dist/src/views/admin/posts/actions/create-edit/create-edit.js.map +1 -0
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.d.ts +10 -7
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.js +2 -1
- package/dist/src/views/admin/posts/actions/create-edit/mutation-api.js.map +1 -0
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.d.ts +7 -4
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.d.ts.map +1 -1
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.js +2 -1
- package/dist/src/views/admin/posts/table/actions/delete/delete-action.js.map +1 -0
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.d.ts +5 -2
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.d.ts.map +1 -1
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.js +2 -1
- package/dist/src/views/admin/posts/table/actions/delete/mutation-api.js.map +1 -0
- package/dist/src/views/admin/posts/table/actions/edit-action.d.ts +8 -5
- package/dist/src/views/admin/posts/table/actions/edit-action.d.ts.map +1 -1
- package/dist/src/views/admin/posts/table/actions/edit-action.js +2 -1
- package/dist/src/views/admin/posts/table/actions/edit-action.js.map +1 -0
- package/dist/src/views/admin/posts/table/posts-admin-view.d.ts +5 -2
- package/dist/src/views/admin/posts/table/posts-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/posts/table/posts-admin-view.js +2 -1
- package/dist/src/views/admin/posts/table/posts-admin-view.js.map +1 -0
- package/package.json +12 -15
- package/src/locales/en.json +11 -1
- package/src/routes/admin/blog/categories/page.tsx +19 -2
- package/src/routes/admin/blog/posts/page.tsx +19 -2
- package/tsconfig.build.json +5 -0
- package/dist/src/database/index.d.ts.map +0 -1
|
@@ -1,56 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
description: string;
|
|
1
|
+
//#region src/api/modules/posts/posts.module.d.ts
|
|
2
|
+
declare const postsModule: import("@vitnode/core/api/lib/module").BuildModuleReturn<"@vitnode/blog", "posts", [import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
3
|
+
method: "get";
|
|
4
|
+
path: "/";
|
|
5
|
+
request: {
|
|
6
|
+
query: import("zod").ZodObject<{
|
|
7
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
first: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
last: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
order: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
11
|
+
asc: "asc";
|
|
12
|
+
desc: "desc";
|
|
13
|
+
}>>;
|
|
14
|
+
orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
15
|
+
createdAt: "createdAt";
|
|
16
|
+
updatedAt: "updatedAt";
|
|
17
|
+
}>>;
|
|
18
|
+
categoryId: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<number, string>>>;
|
|
19
|
+
}, import("zod/v4/core").$strip>;
|
|
20
|
+
};
|
|
21
|
+
responses: {
|
|
22
|
+
200: {
|
|
23
|
+
content: {
|
|
24
|
+
"application/json": {
|
|
25
|
+
schema: import("zod").ZodObject<{
|
|
26
|
+
edges: import("zod").ZodArray<import("zod").ZodObject<{
|
|
27
|
+
id: import("zod").ZodNumber;
|
|
28
|
+
title: import("zod").ZodString;
|
|
29
|
+
titleSeo: import("zod").ZodString;
|
|
30
|
+
content: import("zod").ZodString;
|
|
31
|
+
categoryId: import("zod").ZodNumber;
|
|
32
|
+
createdAt: import("zod").ZodDate;
|
|
33
|
+
updatedAt: import("zod").ZodDate;
|
|
34
|
+
category: import("zod").ZodObject<{
|
|
35
|
+
id: import("zod").ZodNumber;
|
|
36
|
+
title: import("zod").ZodString;
|
|
37
|
+
titleSeo: import("zod").ZodString;
|
|
38
|
+
}, import("zod/v4/core").$strip>;
|
|
39
|
+
}, import("zod/v4/core").$strip>>;
|
|
40
|
+
pageInfo: import("zod").ZodObject<{
|
|
41
|
+
totalCount: import("zod").ZodNumber;
|
|
42
|
+
count: import("zod").ZodNumber;
|
|
43
|
+
hasNextPage: import("zod").ZodBoolean;
|
|
44
|
+
hasPreviousPage: import("zod").ZodBoolean;
|
|
45
|
+
startCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
46
|
+
endCursor: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
47
|
+
}, import("zod/v4/core").$strip>;
|
|
48
|
+
}, import("zod/v4/core").$strip>;
|
|
51
49
|
};
|
|
50
|
+
};
|
|
51
|
+
description: string;
|
|
52
52
|
};
|
|
53
|
+
};
|
|
53
54
|
} & {
|
|
54
|
-
|
|
55
|
+
path: string;
|
|
55
56
|
}>], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig>[]>[]>;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { postsModule };
|
|
56
59
|
//# sourceMappingURL=posts.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.module.d.ts","
|
|
1
|
+
{"version":3,"file":"posts.module.d.ts","names":[],"sources":["../../../../../src/api/modules/posts/posts.module.ts"],"mappings":";cAMa,oDAAW,mFAAA"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{CONFIG_PLUGIN as e}from"../../../const.js";import{postsRoute as t}from"./routes/get.route.js";import{buildModule as n}from"@vitnode/core/api/lib/module";const r=n({pluginId:e.pluginId,name:`posts`,routes:[t]});export{r as postsModule};
|
|
2
|
+
//# sourceMappingURL=posts.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posts.module.js","names":[],"sources":["../../../../../src/api/modules/posts/posts.module.ts"],"sourcesContent":["import { buildModule } from \"@vitnode/core/api/lib/module\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\n\nimport { postsRoute } from \"./routes/get.route\";\n\nexport const postsModule = buildModule({\n pluginId: CONFIG_PLUGIN.pluginId,\n name: \"posts\",\n routes: [postsRoute],\n});\n"],"mappings":"gKAMA,MAAa,EAAc,EAAY,CACrC,SAAU,EAAc,SACxB,KAAM,QACN,OAAQ,CAAC,CAAU,CACrB,CAAC"}
|
|
@@ -1,71 +1,74 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
|
|
2
|
+
//#region src/api/modules/posts/routes/get.route.d.ts
|
|
3
|
+
declare const zodPostSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodNumber;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
titleSeo: z.ZodString;
|
|
7
|
+
content: z.ZodString;
|
|
8
|
+
categoryId: z.ZodNumber;
|
|
9
|
+
createdAt: z.ZodDate;
|
|
10
|
+
updatedAt: z.ZodDate;
|
|
11
|
+
category: z.ZodObject<{
|
|
3
12
|
id: z.ZodNumber;
|
|
4
13
|
title: z.ZodString;
|
|
5
14
|
titleSeo: z.ZodString;
|
|
6
|
-
|
|
7
|
-
categoryId: z.ZodNumber;
|
|
8
|
-
createdAt: z.ZodDate;
|
|
9
|
-
updatedAt: z.ZodDate;
|
|
10
|
-
category: z.ZodObject<{
|
|
11
|
-
id: z.ZodNumber;
|
|
12
|
-
title: z.ZodString;
|
|
13
|
-
titleSeo: z.ZodString;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
+
}, z.core.$strip>;
|
|
15
16
|
}, z.core.$strip>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
description: string;
|
|
17
|
+
declare const postsRoute: import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", {
|
|
18
|
+
method: "get";
|
|
19
|
+
path: "/";
|
|
20
|
+
request: {
|
|
21
|
+
query: z.ZodObject<{
|
|
22
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
23
|
+
first: z.ZodOptional<z.ZodString>;
|
|
24
|
+
last: z.ZodOptional<z.ZodString>;
|
|
25
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
asc: "asc";
|
|
27
|
+
desc: "desc";
|
|
28
|
+
}>>;
|
|
29
|
+
orderBy: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
createdAt: "createdAt";
|
|
31
|
+
updatedAt: "updatedAt";
|
|
32
|
+
}>>;
|
|
33
|
+
categoryId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
};
|
|
36
|
+
responses: {
|
|
37
|
+
200: {
|
|
38
|
+
content: {
|
|
39
|
+
"application/json": {
|
|
40
|
+
schema: z.ZodObject<{
|
|
41
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
42
|
+
id: z.ZodNumber;
|
|
43
|
+
title: z.ZodString;
|
|
44
|
+
titleSeo: z.ZodString;
|
|
45
|
+
content: z.ZodString;
|
|
46
|
+
categoryId: z.ZodNumber;
|
|
47
|
+
createdAt: z.ZodDate;
|
|
48
|
+
updatedAt: z.ZodDate;
|
|
49
|
+
category: z.ZodObject<{
|
|
50
|
+
id: z.ZodNumber;
|
|
51
|
+
title: z.ZodString;
|
|
52
|
+
titleSeo: z.ZodString;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
pageInfo: z.ZodObject<{
|
|
56
|
+
totalCount: z.ZodNumber;
|
|
57
|
+
count: z.ZodNumber;
|
|
58
|
+
hasNextPage: z.ZodBoolean;
|
|
59
|
+
hasPreviousPage: z.ZodBoolean;
|
|
60
|
+
startCursor: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
endCursor: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
}, z.core.$strip>;
|
|
66
64
|
};
|
|
65
|
+
};
|
|
66
|
+
description: string;
|
|
67
67
|
};
|
|
68
|
+
};
|
|
68
69
|
} & {
|
|
69
|
-
|
|
70
|
+
path: string;
|
|
70
71
|
}>;
|
|
72
|
+
//#endregion
|
|
73
|
+
export { postsRoute, zodPostSchema };
|
|
71
74
|
//# sourceMappingURL=get.route.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.route.d.ts","
|
|
1
|
+
{"version":3,"file":"get.route.d.ts","names":[],"sources":["../../../../../../src/api/modules/posts/routes/get.route.ts"],"mappings":";;cAaa,eAAa,EAAA;;;;;;;;;;;;;;cAeb,kDAAU"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{z}from"@hono/zod-openapi";import{buildRoute}from"@vitnode/core/api/lib/route";import{withPagination,zodPaginationPageInfo,zodPaginationQuery}from"@vitnode/core/api/lib/with-pagination";
|
|
1
|
+
import{CONFIG_PLUGIN as e}from"../../../../const.js";import{blog_categories as t}from"../../../../database/categories.js";import{blog_posts as n}from"../../../../database/posts.js";import{z as r}from"@hono/zod-openapi";import{buildRoute as i}from"@vitnode/core/api/lib/route";import{eq as a}from"drizzle-orm";import{withPagination as o,zodPaginationPageInfo as s,zodPaginationQuery as c}from"@vitnode/core/api/lib/with-pagination";const l=r.object({id:r.number(),title:r.string(),titleSeo:r.string(),content:r.string(),categoryId:r.number(),createdAt:r.date(),updatedAt:r.date(),category:r.object({id:r.number(),title:r.string(),titleSeo:r.string()})}),u=i({pluginId:e.pluginId,route:{method:`get`,path:`/`,request:{query:c.extend({order:r.enum([`asc`,`desc`]).optional(),orderBy:r.enum([`updatedAt`,`createdAt`]).optional(),categoryId:r.string().transform(Number).optional()})},responses:{200:{content:{"application/json":{schema:r.object({edges:r.array(l),pageInfo:s})}},description:`Posts retrieved successfully`}}},handler:async e=>{let r=e.req.valid(`query`),i=await o({c:e,params:{query:r},primaryCursor:n.id,query:async({limit:i,where:o,orderBy:s})=>await e.get(`db`).select({id:n.id,title:n.title,titleSeo:n.titleSeo,content:n.content,categoryId:n.categoryId,createdAt:n.createdAt,updatedAt:n.updatedAt,category:{id:t.id,title:t.title,titleSeo:t.titleSeo}}).from(n).innerJoin(t,a(n.categoryId,t.id)).where(r.categoryId?a(n.categoryId,r.categoryId):o).orderBy(s).limit(i),table:n,orderBy:{column:r.orderBy?n[r.orderBy]:n.updatedAt,order:r.order??`desc`}});return e.json(i)}});export{u as postsRoute,l as zodPostSchema};
|
|
2
|
+
//# sourceMappingURL=get.route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.route.js","names":[],"sources":["../../../../../../src/api/modules/posts/routes/get.route.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\nimport { buildRoute } from \"@vitnode/core/api/lib/route\";\nimport {\n withPagination,\n zodPaginationPageInfo,\n zodPaginationQuery,\n} from \"@vitnode/core/api/lib/with-pagination\";\nimport { eq } from \"drizzle-orm\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\nimport { blog_categories } from \"@/database/categories\";\nimport { blog_posts } from \"@/database/posts\";\n\nexport const zodPostSchema = z.object({\n id: z.number(),\n title: z.string(),\n titleSeo: z.string(),\n content: z.string(),\n categoryId: z.number(),\n createdAt: z.date(),\n updatedAt: z.date(),\n category: z.object({\n id: z.number(),\n title: z.string(),\n titleSeo: z.string(),\n }),\n});\n\nexport const postsRoute = buildRoute({\n pluginId: CONFIG_PLUGIN.pluginId,\n route: {\n method: \"get\",\n path: \"/\",\n request: {\n query: zodPaginationQuery.extend({\n order: z.enum([\"asc\", \"desc\"]).optional(),\n orderBy: z.enum([\"updatedAt\", \"createdAt\"]).optional(),\n categoryId: z.string().transform(Number).optional(),\n }),\n },\n responses: {\n 200: {\n content: {\n \"application/json\": {\n schema: z.object({\n edges: z.array(zodPostSchema),\n pageInfo: zodPaginationPageInfo,\n }),\n },\n },\n description: \"Posts retrieved successfully\",\n },\n },\n },\n handler: async c => {\n const query = c.req.valid(\"query\");\n\n const data = await withPagination({\n c,\n params: {\n query,\n },\n primaryCursor: blog_posts.id,\n query: async ({ limit, where, orderBy }) =>\n await c\n .get(\"db\")\n .select({\n id: blog_posts.id,\n title: blog_posts.title,\n titleSeo: blog_posts.titleSeo,\n content: blog_posts.content,\n categoryId: blog_posts.categoryId,\n createdAt: blog_posts.createdAt,\n updatedAt: blog_posts.updatedAt,\n category: {\n id: blog_categories.id,\n title: blog_categories.title,\n titleSeo: blog_categories.titleSeo,\n },\n })\n .from(blog_posts)\n .innerJoin(\n blog_categories,\n eq(blog_posts.categoryId, blog_categories.id),\n )\n .where(\n query.categoryId\n ? eq(blog_posts.categoryId, query.categoryId)\n : where,\n )\n .orderBy(orderBy)\n .limit(limit),\n table: blog_posts,\n orderBy: {\n column: query.orderBy\n ? blog_posts[query.orderBy]\n : blog_posts.updatedAt,\n order: query.order ?? \"desc\",\n },\n });\n\n return c.json(data);\n },\n});\n"],"mappings":"+aAaA,MAAa,EAAgB,EAAE,OAAO,CACpC,GAAI,EAAE,OAAO,EACb,MAAO,EAAE,OAAO,EAChB,SAAU,EAAE,OAAO,EACnB,QAAS,EAAE,OAAO,EAClB,WAAY,EAAE,OAAO,EACrB,UAAW,EAAE,KAAK,EAClB,UAAW,EAAE,KAAK,EAClB,SAAU,EAAE,OAAO,CACjB,GAAI,EAAE,OAAO,EACb,MAAO,EAAE,OAAO,EAChB,SAAU,EAAE,OAAO,CACrB,CAAC,CACH,CAAC,EAEY,EAAa,EAAW,CACnC,SAAU,EAAc,SACxB,MAAO,CACL,OAAQ,MACR,KAAM,IACN,QAAS,CACP,MAAO,EAAmB,OAAO,CAC/B,MAAO,EAAE,KAAK,CAAC,MAAO,MAAM,CAAC,CAAC,CAAC,SAAS,EACxC,QAAS,EAAE,KAAK,CAAC,YAAa,WAAW,CAAC,CAAC,CAAC,SAAS,EACrD,WAAY,EAAE,OAAO,CAAC,CAAC,UAAU,MAAM,CAAC,CAAC,SAAS,CACpD,CAAC,CACH,EACA,UAAW,CACT,IAAK,CACH,QAAS,CACP,mBAAoB,CAClB,OAAQ,EAAE,OAAO,CACf,MAAO,EAAE,MAAM,CAAa,EAC5B,SAAU,CACZ,CAAC,CACH,CACF,EACA,YAAa,8BACf,CACF,CACF,EACA,QAAS,KAAM,IAAK,CAClB,IAAM,EAAQ,EAAE,IAAI,MAAM,OAAO,EAE3B,EAAO,MAAM,EAAe,CAChC,IACA,OAAQ,CACN,OACF,EACA,cAAe,EAAW,GAC1B,MAAO,MAAO,CAAE,QAAO,QAAO,aAC5B,MAAM,EACH,IAAI,IAAI,CAAC,CACT,OAAO,CACN,GAAI,EAAW,GACf,MAAO,EAAW,MAClB,SAAU,EAAW,SACrB,QAAS,EAAW,QACpB,WAAY,EAAW,WACvB,UAAW,EAAW,UACtB,UAAW,EAAW,UACtB,SAAU,CACR,GAAI,EAAgB,GACpB,MAAO,EAAgB,MACvB,SAAU,EAAgB,QAC5B,CACF,CAAC,CAAC,CACD,KAAK,CAAU,CAAC,CAChB,UACC,EACA,EAAG,EAAW,WAAY,EAAgB,EAAE,CAC9C,CAAC,CACA,MACC,EAAM,WACF,EAAG,EAAW,WAAY,EAAM,UAAU,EAC1C,CACN,CAAC,CACA,QAAQ,CAAO,CAAC,CAChB,MAAM,CAAK,EAChB,MAAO,EACP,QAAS,CACP,OAAQ,EAAM,QACV,EAAW,EAAM,SACjB,EAAW,UACf,MAAO,EAAM,OAAS,MACxB,CACF,CAAC,EAED,OAAO,EAAE,KAAK,CAAI,CACpB,CACF,CAAC"}
|
package/dist/src/config.api.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/config.api.d.ts
|
|
2
|
+
declare const blogApiPlugin: () => import("@vitnode/core/api/lib/plugin").BuildPluginApiReturn;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { blogApiPlugin };
|
|
2
5
|
//# sourceMappingURL=config.api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.api.d.ts","
|
|
1
|
+
{"version":3,"file":"config.api.d.ts","names":[],"sources":["../../src/config.api.ts"],"mappings":";cAQa,4DAAa"}
|
package/dist/src/config.api.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{CONFIG_PLUGIN as e}from"./const.js";import{adminModule as t}from"./api/modules/admin/admin.module.js";import{categoriesModule as n}from"./api/modules/categories/categories.module.js";import{postsModule as r}from"./api/modules/posts/posts.module.js";import{buildApiPlugin as i}from"@vitnode/core/api/lib/plugin";const a=()=>i({pluginId:e.pluginId,modules:[t,n,r],permissionStaff:{moderator:{posts:[`can_edit`,`can_delete`]},admin:{posts:[`can_view`,{permission:`can_create`,dependsOn:[`can_view`]},`can_edit`,`can_delete`],categories:[`can_view`,`can_create`,`can_edit`,`can_delete`]}}});export{a as blogApiPlugin};
|
|
2
|
+
//# sourceMappingURL=config.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.api.js","names":[],"sources":["../../src/config.api.ts"],"sourcesContent":["import { buildApiPlugin } from \"@vitnode/core/api/lib/plugin\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\n\nimport { adminModule } from \"./api/modules/admin/admin.module\";\nimport { categoriesModule } from \"./api/modules/categories/categories.module\";\nimport { postsModule } from \"./api/modules/posts/posts.module\";\n\nexport const blogApiPlugin = () => {\n return buildApiPlugin({\n pluginId: CONFIG_PLUGIN.pluginId,\n modules: [adminModule, categoriesModule, postsModule],\n permissionStaff: {\n moderator: {\n posts: [\"can_edit\", \"can_delete\"],\n },\n admin: {\n posts: [\n \"can_view\",\n {\n permission: \"can_create\",\n dependsOn: [\"can_view\"],\n },\n \"can_edit\",\n \"can_delete\",\n ],\n categories: [\"can_view\", \"can_create\", \"can_edit\", \"can_delete\"],\n },\n },\n });\n};\n"],"mappings":"8TAQA,MAAa,MACJ,EAAe,CACpB,SAAU,EAAc,SACxB,QAAS,CAAC,EAAa,EAAkB,CAAW,EACpD,gBAAiB,CACf,UAAW,CACT,MAAO,CAAC,WAAY,YAAY,CAClC,EACA,MAAO,CACL,MAAO,CACL,WACA,CACE,WAAY,aACZ,UAAW,CAAC,UAAU,CACxB,EACA,WACA,YACF,EACA,WAAY,CAAC,WAAY,aAAc,WAAY,YAAY,CACjE,CACF,CACF,CAAC"}
|
package/dist/src/config.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/config.d.ts
|
|
2
|
+
declare const blogPlugin: () => import("@vitnode/core/lib/plugin").BuildPluginReturn<"@vitnode/blog">;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { blogPlugin };
|
|
2
5
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","
|
|
1
|
+
{"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config.tsx"],"mappings":";cAKa,qDAAU"}
|
package/dist/src/config.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{CONFIG_PLUGIN as e}from"./const.js";import{jsx as t}from"react/jsx-runtime";import{buildPlugin as n}from"@vitnode/core/lib/plugin";import{ListIcon as r,NotebookPenIcon as i}from"lucide-react";const a=()=>n({pluginId:e.pluginId,admin:{nav:[{id:`posts`,href:`/admin/blog/posts`,icon:t(i,{}),permission:{module:`posts`,permission:`can_view`}},{id:`categories`,href:`/admin/blog/categories`,icon:t(r,{}),permission:{module:`categories`,permission:`can_view`}}]}});export{a as blogPlugin};
|
|
2
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","names":[],"sources":["../../src/config.tsx"],"sourcesContent":["import { buildPlugin } from \"@vitnode/core/lib/plugin\";\nimport { ListIcon, NotebookPenIcon } from \"lucide-react\";\n\nimport { CONFIG_PLUGIN } from \"@/const\";\n\nexport const blogPlugin = () => {\n return buildPlugin({\n pluginId: CONFIG_PLUGIN.pluginId,\n admin: {\n nav: [\n {\n id: \"posts\",\n href: \"/admin/blog/posts\",\n icon: <NotebookPenIcon />,\n permission: { module: \"posts\", permission: \"can_view\" },\n },\n {\n id: \"categories\",\n href: \"/admin/blog/categories\",\n icon: <ListIcon />,\n permission: { module: \"categories\", permission: \"can_view\" },\n },\n ],\n },\n });\n};\n"],"mappings":"uMAKA,MAAa,MACJ,EAAY,CACjB,SAAU,EAAc,SACxB,MAAO,CACL,IAAK,CACH,CACE,GAAI,QACJ,KAAM,oBACN,KAAM,EAAC,EAAD,CAAkB,CAAA,EACxB,WAAY,CAAE,OAAQ,QAAS,WAAY,UAAW,CACxD,EACA,CACE,GAAI,aACJ,KAAM,yBACN,KAAM,EAAC,EAAD,CAAW,CAAA,EACjB,WAAY,CAAE,OAAQ,aAAc,WAAY,UAAW,CAC7D,CACF,CACF,CACF,CAAC"}
|
package/dist/src/const.d.ts
CHANGED
package/dist/src/const.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","
|
|
1
|
+
{"version":3,"file":"const.d.ts","names":[],"sources":["../../src/const.ts"],"mappings":";cAAa;EAAA"}
|
package/dist/src/const.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e={pluginId:`@vitnode/blog`};export{e as CONFIG_PLUGIN};
|
|
2
|
+
//# sourceMappingURL=const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.js","names":[],"sources":["../../src/const.ts"],"sourcesContent":["export const CONFIG_PLUGIN = {\n pluginId: \"@vitnode/blog\" as const,\n};\n"],"mappings":"AAAA,MAAa,EAAgB,CAC3B,SAAU,eACZ"}
|
|
@@ -1,97 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
1
|
+
//#region src/database/categories.d.ts
|
|
2
|
+
declare const blog_categories: Omit<import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3
|
+
name: "blog_categories";
|
|
4
|
+
schema: undefined;
|
|
5
|
+
columns: {
|
|
6
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
7
|
+
name: "id";
|
|
8
|
+
tableName: "blog_categories";
|
|
9
|
+
dataType: "number";
|
|
10
|
+
columnType: "PgSerial";
|
|
11
|
+
data: number;
|
|
12
|
+
driverParam: number;
|
|
13
|
+
notNull: true;
|
|
14
|
+
hasDefault: true;
|
|
15
|
+
isPrimaryKey: true;
|
|
16
|
+
isAutoincrement: false;
|
|
17
|
+
hasRuntimeDefault: false;
|
|
18
|
+
enumValues: undefined;
|
|
19
|
+
baseColumn: never;
|
|
20
|
+
identity: undefined;
|
|
21
|
+
generated: undefined;
|
|
22
|
+
}, {}, {}>;
|
|
23
|
+
title: import("drizzle-orm/pg-core").PgColumn<{
|
|
24
|
+
name: "title";
|
|
25
|
+
tableName: "blog_categories";
|
|
26
|
+
dataType: "string";
|
|
27
|
+
columnType: "PgVarchar";
|
|
28
|
+
data: string;
|
|
29
|
+
driverParam: string;
|
|
30
|
+
notNull: true;
|
|
31
|
+
hasDefault: false;
|
|
32
|
+
isPrimaryKey: false;
|
|
33
|
+
isAutoincrement: false;
|
|
34
|
+
hasRuntimeDefault: false;
|
|
35
|
+
enumValues: [string, ...string[]];
|
|
36
|
+
baseColumn: never;
|
|
37
|
+
identity: undefined;
|
|
38
|
+
generated: undefined;
|
|
39
|
+
}, {}, {
|
|
40
|
+
length: 100;
|
|
41
|
+
}>;
|
|
42
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
43
|
+
name: "createdAt";
|
|
44
|
+
tableName: "blog_categories";
|
|
45
|
+
dataType: "date";
|
|
46
|
+
columnType: "PgTimestamp";
|
|
47
|
+
data: Date;
|
|
48
|
+
driverParam: string;
|
|
49
|
+
notNull: true;
|
|
50
|
+
hasDefault: true;
|
|
51
|
+
isPrimaryKey: false;
|
|
52
|
+
isAutoincrement: false;
|
|
53
|
+
hasRuntimeDefault: false;
|
|
54
|
+
enumValues: undefined;
|
|
55
|
+
baseColumn: never;
|
|
56
|
+
identity: undefined;
|
|
57
|
+
generated: undefined;
|
|
58
|
+
}, {}, {}>;
|
|
59
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
60
|
+
name: "updatedAt";
|
|
61
|
+
tableName: "blog_categories";
|
|
62
|
+
dataType: "date";
|
|
63
|
+
columnType: "PgTimestamp";
|
|
64
|
+
data: Date;
|
|
65
|
+
driverParam: string;
|
|
66
|
+
notNull: true;
|
|
67
|
+
hasDefault: true;
|
|
68
|
+
isPrimaryKey: false;
|
|
69
|
+
isAutoincrement: false;
|
|
70
|
+
hasRuntimeDefault: false;
|
|
71
|
+
enumValues: undefined;
|
|
72
|
+
baseColumn: never;
|
|
73
|
+
identity: undefined;
|
|
74
|
+
generated: undefined;
|
|
75
|
+
}, {}, {}>;
|
|
76
|
+
titleSeo: import("drizzle-orm/pg-core").PgColumn<{
|
|
77
|
+
name: "titleSeo";
|
|
78
|
+
tableName: "blog_categories";
|
|
79
|
+
dataType: "string";
|
|
80
|
+
columnType: "PgVarchar";
|
|
81
|
+
data: string;
|
|
82
|
+
driverParam: string;
|
|
83
|
+
notNull: true;
|
|
84
|
+
hasDefault: true;
|
|
85
|
+
isPrimaryKey: false;
|
|
86
|
+
isAutoincrement: false;
|
|
87
|
+
hasRuntimeDefault: false;
|
|
88
|
+
enumValues: [string, ...string[]];
|
|
89
|
+
baseColumn: never;
|
|
90
|
+
identity: undefined;
|
|
91
|
+
generated: undefined;
|
|
92
|
+
}, {}, {
|
|
93
|
+
length: 100;
|
|
94
|
+
}>;
|
|
95
|
+
};
|
|
96
|
+
dialect: "pg";
|
|
96
97
|
}>, "enableRLS">;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { blog_categories };
|
|
97
100
|
//# sourceMappingURL=categories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.d.ts","
|
|
1
|
+
{"version":3,"file":"categories.d.ts","names":[],"sources":["../../../src/database/categories.ts"],"mappings":";cAEa,iBAAe,mCAAA"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{pgTable}from"drizzle-orm/pg-core";
|
|
1
|
+
import{pgTable as e}from"drizzle-orm/pg-core";const t=e(`blog_categories`,e=>({id:e.serial().primaryKey(),title:e.varchar({length:100}).notNull(),createdAt:e.timestamp().notNull().defaultNow(),updatedAt:e.timestamp().notNull().$onUpdate(()=>new Date),titleSeo:e.varchar({length:100}).notNull().unique().default(``)})).enableRLS();export{t as blog_categories};
|
|
2
|
+
//# sourceMappingURL=categories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categories.js","names":[],"sources":["../../../src/database/categories.ts"],"sourcesContent":["import { pgTable } from \"drizzle-orm/pg-core\";\n\nexport const blog_categories = pgTable(\"blog_categories\", t => ({\n id: t.serial().primaryKey(),\n title: t.varchar({ length: 100 }).notNull(),\n createdAt: t.timestamp().notNull().defaultNow(),\n updatedAt: t\n .timestamp()\n .notNull()\n .$onUpdate(() => new Date()),\n titleSeo: t.varchar({ length: 100 }).notNull().unique().default(\"\"),\n})).enableRLS();\n"],"mappings":"8CAEA,MAAa,EAAkB,EAAQ,kBAAmB,IAAM,CAC9D,GAAI,EAAE,OAAO,CAAC,CAAC,WAAW,EAC1B,MAAO,EAAE,QAAQ,CAAE,OAAQ,GAAI,CAAC,CAAC,CAAC,QAAQ,EAC1C,UAAW,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,EAC9C,UAAW,EACR,UAAU,CAAC,CACX,QAAQ,CAAC,CACT,cAAgB,IAAI,IAAM,EAC7B,SAAU,EAAE,QAAQ,CAAE,OAAQ,GAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CACpE,EAAE,CAAC,CAAC,UAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { blog_categories } from "./categories.js";
|
|
2
|
+
import { blog_posts } from "./posts.js";
|
|
3
|
+
import { blog_categories_relations, blog_posts_relations } from "./relations.js";
|
|
4
|
+
export { blog_categories, blog_categories_relations, blog_posts, blog_posts_relations };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{blog_categories as e}from"./categories.js";import{blog_posts as t}from"./posts.js";import{blog_categories_relations as n,blog_posts_relations as r}from"./relations.js";export{e as blog_categories,n as blog_categories_relations,t as blog_posts,r as blog_posts_relations};
|