@yimingliao/cms 0.0.252 → 0.0.253

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.
Files changed (61) hide show
  1. package/dist/export/server/index.js +1 -1
  2. package/dist/src/client/interfaces/components/resources/file/file-relations-section.js +6 -6
  3. package/dist/src/domain/resources/file/utils/is-file-locked.js +2 -2
  4. package/dist/src/server/infrastructure/database/config/command/create-config-command-repository.js +31 -1
  5. package/dist/src/server/infrastructure/database/config/include.js +17 -0
  6. package/dist/src/server/infrastructure/database/config/query/{create-post-query-repository.js → create-config-query-repository.js} +3 -2
  7. package/dist/src/server/infrastructure/database/file/include.js +6 -6
  8. package/dist/src/server/infrastructure/database/post/command/create-post-command-repository.js +24 -24
  9. package/dist/src/server/infrastructure/database/post/include.js +6 -6
  10. package/dist/src/server/infrastructure/database/utils/build-file-usage.js +6 -6
  11. package/dist/src/server/infrastructure/zod/schemas/schemas.js +8 -0
  12. package/dist/src/server/interfaces/actions/resources/config/commands/update/config-update-validator.js +11 -0
  13. package/dist/src/server/interfaces/actions/resources/file/commands/create/file-create-validator.js +3 -3
  14. package/dist/src/server/interfaces/actions/resources/file/commands/create-many/file-create-many-validator.js +3 -3
  15. package/dist/src/server/interfaces/actions/resources/file/commands/update/file-update-validator.js +3 -3
  16. package/dist/src/server/interfaces/actions/resources/post/commands/create/post-create-validator.js +29 -9
  17. package/dist/src/server/interfaces/actions/resources/post/commands/update/post-update-validator.js +29 -9
  18. package/dist/src/server/interfaces/apis/multi-files-upload/validator.js +2 -2
  19. package/dist/types/src/domain/resources/config/full.d.ts +7 -0
  20. package/dist/types/src/domain/resources/config/full.d.ts.map +1 -1
  21. package/dist/types/src/domain/resources/file/full.d.ts +6 -6
  22. package/dist/types/src/domain/resources/file/full.d.ts.map +1 -1
  23. package/dist/types/src/domain/resources/post/base.d.ts +12 -4
  24. package/dist/types/src/domain/resources/post/base.d.ts.map +1 -1
  25. package/dist/types/src/domain/resources/post/full.d.ts +6 -6
  26. package/dist/types/src/domain/resources/post/full.d.ts.map +1 -1
  27. package/dist/types/src/domain/resources/post/translation.d.ts +8 -0
  28. package/dist/types/src/domain/resources/post/translation.d.ts.map +1 -1
  29. package/dist/types/src/server/infrastructure/database/config/command/create-config-command-repository.d.ts +1 -1
  30. package/dist/types/src/server/infrastructure/database/config/command/create-config-command-repository.d.ts.map +1 -1
  31. package/dist/types/src/server/infrastructure/database/config/command/types.d.ts +7 -1
  32. package/dist/types/src/server/infrastructure/database/config/command/types.d.ts.map +1 -1
  33. package/dist/types/src/server/infrastructure/database/config/include.d.ts +34 -0
  34. package/dist/types/src/server/infrastructure/database/config/include.d.ts.map +1 -0
  35. package/dist/types/src/server/infrastructure/database/config/query/{create-post-query-repository.d.ts → create-config-query-repository.d.ts} +1 -1
  36. package/dist/types/src/server/infrastructure/database/config/query/create-config-query-repository.d.ts.map +1 -0
  37. package/dist/types/src/server/infrastructure/database/config/query/index.d.ts +1 -1
  38. package/dist/types/src/server/infrastructure/database/config/query/index.d.ts.map +1 -1
  39. package/dist/types/src/server/infrastructure/database/file/include.d.ts +6 -6
  40. package/dist/types/src/server/infrastructure/database/post/command/create-post-command-repository.d.ts +2 -2
  41. package/dist/types/src/server/infrastructure/database/post/command/create-post-command-repository.d.ts.map +1 -1
  42. package/dist/types/src/server/infrastructure/database/post/command/types.d.ts +44 -12
  43. package/dist/types/src/server/infrastructure/database/post/command/types.d.ts.map +1 -1
  44. package/dist/types/src/server/infrastructure/database/post/include.d.ts +6 -6
  45. package/dist/types/src/server/infrastructure/zod/schemas/schemas.d.ts +1 -0
  46. package/dist/types/src/server/infrastructure/zod/schemas/schemas.d.ts.map +1 -1
  47. package/dist/types/src/server/interfaces/actions/resources/config/commands/update/config-update-validator.d.ts +26 -0
  48. package/dist/types/src/server/interfaces/actions/resources/config/commands/update/config-update-validator.d.ts.map +1 -1
  49. package/dist/types/src/server/interfaces/actions/resources/post/commands/create/create-post-create-action.d.ts +7 -7
  50. package/dist/types/src/server/interfaces/actions/resources/post/commands/create/create-post-create-action.d.ts.map +1 -1
  51. package/dist/types/src/server/interfaces/actions/resources/post/commands/create/post-create-validator.d.ts +82 -18
  52. package/dist/types/src/server/interfaces/actions/resources/post/commands/create/post-create-validator.d.ts.map +1 -1
  53. package/dist/types/src/server/interfaces/actions/resources/post/commands/update/create-post-update-action.d.ts +7 -7
  54. package/dist/types/src/server/interfaces/actions/resources/post/commands/update/create-post-update-action.d.ts.map +1 -1
  55. package/dist/types/src/server/interfaces/actions/resources/post/commands/update/post-update-validator.d.ts +82 -18
  56. package/dist/types/src/server/interfaces/actions/resources/post/commands/update/post-update-validator.d.ts.map +1 -1
  57. package/package.json +1 -1
  58. package/prisma/schema/Config/Config.prisma +18 -0
  59. package/prisma/schema/File/File.prisma +21 -11
  60. package/prisma/schema/Post/{Post.prisma → post.prisma} +39 -15
  61. package/dist/types/src/server/infrastructure/database/config/query/create-post-query-repository.d.ts.map +0 -1
@@ -3,18 +3,18 @@ import type { PostListCard } from "../../../../../../../domain/resources/post/ca
3
3
  import type { ActionContext } from "../../../../action-context";
4
4
  import type z from "zod";
5
5
  import { postUpdateValidator } from "./post-update-validator";
6
- export type PostUpdateFormData = Omit<z.infer<ReturnType<typeof postUpdateValidator>>, "author" | "parents" | "tags" | "relatedPosts" | "coverImage" | "images1" | "images2" | "image1" | "image2" | "image3" | "image4"> & {
6
+ export type PostUpdateFormData = Omit<z.infer<ReturnType<typeof postUpdateValidator>>, "author" | "parents" | "tags" | "relatedPosts" | "coverImage" | "files1" | "files2" | "file1" | "file2" | "file3" | "file4"> & {
7
7
  author: AdminFull | null;
8
8
  parents: PostListCard[];
9
9
  tags: PostListCard[];
10
10
  relatedPosts: PostListCard[];
11
11
  coverImage: FileCard | null;
12
- images1: FileCard[];
13
- images2: FileCard[];
14
- image1: FileCard | null;
15
- image2: FileCard | null;
16
- image3: FileCard | null;
17
- image4: FileCard | null;
12
+ files1: FileCard[];
13
+ files2: FileCard[];
14
+ file1: FileCard | null;
15
+ file2: FileCard | null;
16
+ file3: FileCard | null;
17
+ file4: FileCard | null;
18
18
  };
19
19
  export declare function createPostUpdateAction(ctx: ActionContext): ({ id, formData, }: {
20
20
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"create-post-update-action.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/server/interfaces/actions/resources/post/commands/update/create-post-update-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,EAC7C,QAAQ,GACR,SAAS,GACT,MAAM,GACN,cAAc,GACd,YAAY,GAEZ,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,CACX,GAAG;IACF,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE5B,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,aAAa,IAQhB,mBAGpC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;;IAgCF"}
1
+ {"version":3,"file":"create-post-update-action.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/server/interfaces/actions/resources/post/commands/update/create-post-update-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,EAC7C,QAAQ,GACR,SAAS,GACT,MAAM,GACN,cAAc,GACd,YAAY,GAEZ,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,CACV,GAAG;IACF,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE5B,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,aAAa,IAQhB,mBAGpC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,kBAAkB,CAAC;CAC9B;;IAgCF"}
@@ -54,30 +54,30 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
54
54
  state8: import("zod").ZodBoolean;
55
55
  state9: import("zod").ZodBoolean;
56
56
  state10: import("zod").ZodBoolean;
57
- images1: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodObject<{
57
+ files1: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodObject<{
58
58
  id: import("zod").ZodString;
59
59
  }, import("zod/v4/core").$strip>>, import("zod").ZodTransform<{
60
60
  id: string;
61
61
  }[], {
62
62
  id: string;
63
63
  }[]>>;
64
- images2: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodObject<{
64
+ files2: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodObject<{
65
65
  id: import("zod").ZodString;
66
66
  }, import("zod/v4/core").$strip>>, import("zod").ZodTransform<{
67
67
  id: string;
68
68
  }[], {
69
69
  id: string;
70
70
  }[]>>;
71
- image1: import("zod").ZodNullable<import("zod").ZodObject<{
71
+ file1: import("zod").ZodNullable<import("zod").ZodObject<{
72
72
  id: import("zod").ZodString;
73
73
  }, import("zod/v4/core").$strip>>;
74
- image2: import("zod").ZodNullable<import("zod").ZodObject<{
74
+ file2: import("zod").ZodNullable<import("zod").ZodObject<{
75
75
  id: import("zod").ZodString;
76
76
  }, import("zod/v4/core").$strip>>;
77
- image3: import("zod").ZodNullable<import("zod").ZodObject<{
77
+ file3: import("zod").ZodNullable<import("zod").ZodObject<{
78
78
  id: import("zod").ZodString;
79
79
  }, import("zod/v4/core").$strip>>;
80
- image4: import("zod").ZodNullable<import("zod").ZodObject<{
80
+ file4: import("zod").ZodNullable<import("zod").ZodObject<{
81
81
  id: import("zod").ZodString;
82
82
  }, import("zod/v4/core").$strip>>;
83
83
  text1: import("zod").ZodNullable<import("zod").ZodString>;
@@ -94,6 +94,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
94
94
  data2: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodAny>, import("zod").ZodTransform<any[], any[]>>;
95
95
  data3: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodAny>, import("zod").ZodTransform<any[], any[]>>;
96
96
  data4: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodAny>, import("zod").ZodTransform<any[], any[]>>;
97
+ dec1: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
98
+ dec2: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
99
+ dec3: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
100
+ dec4: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
101
+ int1: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
102
+ int2: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
103
+ int3: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
104
+ int4: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
97
105
  translations: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodObject<{
98
106
  locale: import("zod").ZodString;
99
107
  title: import("zod").ZodNullable<import("zod").ZodString>;
@@ -138,6 +146,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
138
146
  data2: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodAny>, import("zod").ZodTransform<any[], any[]>>;
139
147
  data3: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodAny>, import("zod").ZodTransform<any[], any[]>>;
140
148
  data4: import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodAny>, import("zod").ZodTransform<any[], any[]>>;
149
+ dec1: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
150
+ dec2: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
151
+ dec3: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
152
+ dec4: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
153
+ int1: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
154
+ int2: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
155
+ int3: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
156
+ int4: import("zod").ZodNullable<import("zod").ZodPipe<import("zod").ZodTransform<number | undefined, unknown>, import("zod").ZodNumber>>;
141
157
  }, import("zod/v4/core").$strip>>, import("zod").ZodTransform<{
142
158
  locale: string;
143
159
  title: string | null;
@@ -170,6 +186,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
170
186
  data2: any[];
171
187
  data3: any[];
172
188
  data4: any[];
189
+ dec1: number | null;
190
+ dec2: number | null;
191
+ dec3: number | null;
192
+ dec4: number | null;
193
+ int1: number | null;
194
+ int2: number | null;
195
+ int3: number | null;
196
+ int4: number | null;
173
197
  }[], {
174
198
  locale: string;
175
199
  title: string | null;
@@ -202,6 +226,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
202
226
  data2: any[];
203
227
  data3: any[];
204
228
  data4: any[];
229
+ dec1: number | null;
230
+ dec2: number | null;
231
+ dec3: number | null;
232
+ dec4: number | null;
233
+ int1: number | null;
234
+ int2: number | null;
235
+ int3: number | null;
236
+ int4: number | null;
205
237
  }[]>>;
206
238
  }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
207
239
  index: number | null;
@@ -238,6 +270,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
238
270
  data2: any[];
239
271
  data3: any[];
240
272
  data4: any[];
273
+ dec1: number | null;
274
+ dec2: number | null;
275
+ dec3: number | null;
276
+ dec4: number | null;
277
+ int1: number | null;
278
+ int2: number | null;
279
+ int3: number | null;
280
+ int4: number | null;
241
281
  }[];
242
282
  type: string;
243
283
  isLocked: boolean;
@@ -273,22 +313,22 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
273
313
  state8: boolean;
274
314
  state9: boolean;
275
315
  state10: boolean;
276
- images1: {
316
+ files1: {
277
317
  id: string;
278
318
  }[];
279
- images2: {
319
+ files2: {
280
320
  id: string;
281
321
  }[];
282
- image1: {
322
+ file1: {
283
323
  id: string;
284
324
  } | null;
285
- image2: {
325
+ file2: {
286
326
  id: string;
287
327
  } | null;
288
- image3: {
328
+ file3: {
289
329
  id: string;
290
330
  } | null;
291
- image4: {
331
+ file4: {
292
332
  id: string;
293
333
  } | null;
294
334
  text1: string | null;
@@ -305,6 +345,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
305
345
  data2: any[];
306
346
  data3: any[];
307
347
  data4: any[];
348
+ dec1: number | null;
349
+ dec2: number | null;
350
+ dec3: number | null;
351
+ dec4: number | null;
352
+ int1: number | null;
353
+ int2: number | null;
354
+ int3: number | null;
355
+ int4: number | null;
308
356
  }, {
309
357
  type: string;
310
358
  isLocked: boolean;
@@ -342,22 +390,22 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
342
390
  state8: boolean;
343
391
  state9: boolean;
344
392
  state10: boolean;
345
- images1: {
393
+ files1: {
346
394
  id: string;
347
395
  }[];
348
- images2: {
396
+ files2: {
349
397
  id: string;
350
398
  }[];
351
- image1: {
399
+ file1: {
352
400
  id: string;
353
401
  } | null;
354
- image2: {
402
+ file2: {
355
403
  id: string;
356
404
  } | null;
357
- image3: {
405
+ file3: {
358
406
  id: string;
359
407
  } | null;
360
- image4: {
408
+ file4: {
361
409
  id: string;
362
410
  } | null;
363
411
  text1: string | null;
@@ -374,6 +422,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
374
422
  data2: any[];
375
423
  data3: any[];
376
424
  data4: any[];
425
+ dec1: number | null;
426
+ dec2: number | null;
427
+ dec3: number | null;
428
+ dec4: number | null;
429
+ int1: number | null;
430
+ int2: number | null;
431
+ int3: number | null;
432
+ int4: number | null;
377
433
  translations: {
378
434
  locale: string;
379
435
  title: string | null;
@@ -406,6 +462,14 @@ export declare const postUpdateValidator: ({ id, type, topicId, schemas, tocItem
406
462
  data2: any[];
407
463
  data3: any[];
408
464
  data4: any[];
465
+ dec1: number | null;
466
+ dec2: number | null;
467
+ dec3: number | null;
468
+ dec4: number | null;
469
+ int1: number | null;
470
+ int2: number | null;
471
+ int3: number | null;
472
+ int4: number | null;
409
473
  }[];
410
474
  }>>;
411
475
  //# sourceMappingURL=post-update-validator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"post-update-validator.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/server/interfaces/actions/resources/post/commands/update/post-update-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,mBAAmB,GAAI,gDAMjC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAC1C,aAAa,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;CACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiKM,CAAC"}
1
+ {"version":3,"file":"post-update-validator.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/server/interfaces/actions/resources/post/commands/update/post-update-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,mBAAmB,GAAI,gDAMjC;IACD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAC1C,aAAa,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;CACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyLM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.252",
3
+ "version": "0.0.253",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,6 +16,24 @@ model Config {
16
16
  createdAt DateTime @default(now()) @map("created_at")
17
17
  updatedAt DateTime @updatedAt @map("updated_at")
18
18
 
19
+ // -----------------------------------------------------------------------
20
+ // --- custom fields
21
+ // -----------------------------------------------------------------------
22
+
23
+ // multi files
24
+ files1 File[] @relation("config_files1")
25
+ files2 File[] @relation("config_files2")
26
+
27
+ // single files
28
+ file1 File? @relation(fields: [file1Id], references: [id], name: "config_file1", onDelete: Restrict)
29
+ file1Id String? @map("file1_id")
30
+ file2 File? @relation(fields: [file2Id], references: [id], name: "config_file2", onDelete: Restrict)
31
+ file2Id String? @map("file2_id")
32
+ file3 File? @relation(fields: [file3Id], references: [id], name: "config_file3", onDelete: Restrict)
33
+ file3Id String? @map("file3_id")
34
+ file4 File? @relation(fields: [file4Id], references: [id], name: "config_file4", onDelete: Restrict)
35
+ file4Id String? @map("file4_id")
36
+
19
37
  @@map("configs")
20
38
  }
21
39
 
@@ -34,8 +34,8 @@ model File {
34
34
  // -----------------------------------------------------------------------
35
35
  // relations: Post
36
36
  // -----------------------------------------------------------------------
37
- postsAsCoverImage Post[] @relation(name: "cover_image")
38
- postsAsContentImage Post[] @relation("content_images")
37
+ postsAsCoverImage Post[] @relation(name: "post_cover_image")
38
+ postsAsContentImage Post[] @relation("post_content_images")
39
39
 
40
40
  // -----------------------------------------------------------------------
41
41
  // relations: FileTranslation
@@ -52,15 +52,25 @@ model File {
52
52
  // -----------------------------------------------------------------------
53
53
  // --- custom fields
54
54
  // -----------------------------------------------------------------------
55
- // multi images (in post)
56
- postsAsImages1 Post[] @relation("images1")
57
- postsAsImages2 Post[] @relation("images2")
58
-
59
- // single images (in post)
60
- postsAsImage1 Post[] @relation(name: "image1")
61
- postsAsImage2 Post[] @relation(name: "image2")
62
- postsAsImage3 Post[] @relation(name: "image3")
63
- postsAsImage4 Post[] @relation(name: "image4")
55
+ // multi files (in post)
56
+ postsAsFiles1 Post[] @relation("post_files1")
57
+ postsAsFiles2 Post[] @relation("post_files2")
58
+
59
+ // single files (in post)
60
+ postsAsFile1 Post[] @relation(name: "post_file1")
61
+ postsAsFile2 Post[] @relation(name: "post_file2")
62
+ postsAsFile3 Post[] @relation(name: "post_file3")
63
+ postsAsFile4 Post[] @relation(name: "post_file4")
64
+
65
+ // multi files (in config)
66
+ configsAsFiles1 Config[] @relation("config_files1")
67
+ configsAsFiles2 Config[] @relation("config_files2")
68
+
69
+ // single files (in config)
70
+ configsAsFile1 Config[] @relation(name: "config_file1")
71
+ configsAsFile2 Config[] @relation(name: "config_file2")
72
+ configsAsFile3 Config[] @relation(name: "config_file3")
73
+ configsAsFile4 Config[] @relation(name: "config_file4")
64
74
 
65
75
  @@index([checksum])
66
76
  @@index([deletedAt])
@@ -49,11 +49,11 @@ model Post {
49
49
  // -----------------------------------------------------------------------
50
50
  // relations: File
51
51
  // -----------------------------------------------------------------------
52
- coverImage File? @relation(fields: [coverImageId], references: [id], name: "cover_image", onDelete: Restrict)
53
- coverImageId String? @map("cover_image_id")
52
+ coverImage File? @relation(fields: [coverImageId], references: [id], name: "post_cover_image", onDelete: Restrict)
53
+ coverImageId String? @map("post_cover_image_id")
54
54
 
55
55
  // content images
56
- contentImages File[] @relation("content_images")
56
+ contentImages File[] @relation("post_content_images")
57
57
 
58
58
  // -----------------------------------------------------------------------
59
59
  // relations: SeoMetadata
@@ -87,19 +87,19 @@ model Post {
87
87
  state9 Boolean @default(false)
88
88
  state10 Boolean @default(false)
89
89
 
90
- // multi images
91
- images1 File[] @relation("images1")
92
- images2 File[] @relation("images2")
90
+ // multi files
91
+ files1 File[] @relation("post_files1")
92
+ files2 File[] @relation("post_files2")
93
93
 
94
- // single images
95
- image1 File? @relation(fields: [image1Id], references: [id], name: "image1", onDelete: Restrict)
96
- image1Id String? @map("image1_id")
97
- image2 File? @relation(fields: [image2Id], references: [id], name: "image2", onDelete: Restrict)
98
- image2Id String? @map("image2_id")
99
- image3 File? @relation(fields: [image3Id], references: [id], name: "image3", onDelete: Restrict)
100
- image3Id String? @map("image3_id")
101
- image4 File? @relation(fields: [image4Id], references: [id], name: "image4", onDelete: Restrict)
102
- image4Id String? @map("image4_id")
94
+ // single files
95
+ file1 File? @relation(fields: [file1Id], references: [id], name: "post_file1", onDelete: Restrict)
96
+ file1Id String? @map("file1_id")
97
+ file2 File? @relation(fields: [file2Id], references: [id], name: "post_file2", onDelete: Restrict)
98
+ file2Id String? @map("file2_id")
99
+ file3 File? @relation(fields: [file3Id], references: [id], name: "post_file3", onDelete: Restrict)
100
+ file3Id String? @map("file3_id")
101
+ file4 File? @relation(fields: [file4Id], references: [id], name: "post_file4", onDelete: Restrict)
102
+ file4Id String? @map("file4_id")
103
103
 
104
104
  // text
105
105
  text1 String?
@@ -119,6 +119,18 @@ model Post {
119
119
  data3 Json[] @default([])
120
120
  data4 Json[] @default([])
121
121
 
122
+ // number (decimal)
123
+ dec1 Decimal?
124
+ dec2 Decimal?
125
+ dec3 Decimal?
126
+ dec4 Decimal?
127
+
128
+ // number (integer)
129
+ int1 Int?
130
+ int2 Int?
131
+ int3 Int?
132
+ int4 Int?
133
+
122
134
  @@index([type, slug])
123
135
  @@map("posts")
124
136
  }
@@ -178,6 +190,18 @@ model PostTranslation {
178
190
  data3 Json[] @default([])
179
191
  data4 Json[] @default([])
180
192
 
193
+ // number (decimal)
194
+ dec1 Decimal?
195
+ dec2 Decimal?
196
+ dec3 Decimal?
197
+ dec4 Decimal?
198
+
199
+ // number (integer)
200
+ int1 Int?
201
+ int2 Int?
202
+ int3 Int?
203
+ int4 Int?
204
+
181
205
  @@unique([postId, locale])
182
206
  @@map("post_translations")
183
207
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-post-query-repository.d.ts","sourceRoot":"","sources":["../../../../../../../../src/server/infrastructure/database/config/query/create-post-query-repository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,YAAY;qBAIhC,UAAU,KAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;oBAU1C,OAAO,CAAC,UAAU,EAAE,CAAC;EAcjD"}