1- import { Prisma } from "@prisma/client " ;
1+ import { Prisma } from "@prisma/sdk " ;
22import { v4 } from "uuid" ;
33
44import { IBbsArticle } from "@ORGANIZATION/PROJECT-api/lib/structures/common/IBbsArticle" ;
@@ -22,11 +22,11 @@ export namespace BbsArticleCommentProvider {
2222 created_at : input . created_at . toISOString ( ) ,
2323 } ) ;
2424 export const select = ( ) =>
25- Prisma . validator < Prisma . bbs_article_commentsFindManyArgs > ( ) ( {
25+ ( {
2626 include : {
2727 snapshots : BbsArticleCommentSnapshotProvider . json . select ( ) ,
2828 } as const ,
29- } ) ;
29+ } ) satisfies Prisma . bbs_article_commentsFindManyArgs ;
3030 }
3131
3232 export const paginate = (
@@ -46,29 +46,27 @@ export namespace BbsArticleCommentProvider {
4646 export const search = (
4747 input : IBbsArticleComment . IRequest . ISearch | undefined ,
4848 ) =>
49- Prisma . validator < Prisma . bbs_article_commentsWhereInput [ "AND" ] > ( ) (
50- input ?. body ?. length
51- ? [
52- {
53- snapshots : {
54- some : {
55- body : {
56- contains : input . body ,
57- } ,
49+ ( input ?. body ?. length
50+ ? [
51+ {
52+ snapshots : {
53+ some : {
54+ body : {
55+ contains : input . body ,
5856 } ,
5957 } ,
6058 } ,
61- ]
62- : [ ] ,
63- ) ;
59+ } ,
60+ ]
61+ : [ ] ) satisfies Prisma . bbs_article_commentsWhereInput [ "AND" ] ;
6462
6563 export const orderBy = (
6664 _key : IBbsArticleComment . IRequest . SortableColumns ,
6765 value : "asc" | "desc" ,
6866 ) =>
69- Prisma . validator < Prisma . bbs_article_commentsOrderByWithRelationInput > ( ) ( {
67+ ( {
7068 created_at : value ,
71- } ) ;
69+ } ) satisfies Prisma . bbs_article_commentsOrderByWithRelationInput ;
7270
7371 export const collect =
7472 <
@@ -81,7 +79,7 @@ export namespace BbsArticleCommentProvider {
8179 ( related : { article : Pick < IBbsArticle , "id" > } ) =>
8280 ( input : Input ) => {
8381 const snapshot = snapshotFactory ( input ) ;
84- return Prisma . validator < Prisma . bbs_article_commentsCreateInput > ( ) ( {
82+ return {
8583 id : v4 ( ) ,
8684 article : {
8785 connect : { id : related . article . id } ,
@@ -90,6 +88,6 @@ export namespace BbsArticleCommentProvider {
9088 create : [ snapshot ] ,
9189 } ,
9290 created_at : new Date ( ) ,
93- } ) ;
91+ } satisfies Prisma . bbs_article_commentsCreateInput ;
9492 } ;
9593}
0 commit comments