@@ -15,15 +15,15 @@ class NotificationRepository {
1515
1616 // 알림 목록 조회 (최신순)
1717 const notifications = await prisma . notification . findMany ( {
18- where : { userId : BigInt ( userId ) } ,
18+ where : { userId : userId } ,
1919 orderBy : { createdAt : 'desc' } , // 최신순 정렬
2020 skip : offset ,
2121 take : limit
2222 } ) ;
2323
2424 // 전체 개수 조회 (페이지네이션 정보 계산용)
2525 const total = await prisma . notification . count ( {
26- where : { userId : BigInt ( userId ) }
26+ where : { userId : userId }
2727 } ) ;
2828
2929 return { items : notifications , total } ;
@@ -71,7 +71,7 @@ class NotificationRepository {
7171 async markAllNotificationsAsRead ( userId ) {
7272 return await prisma . notification . updateMany ( {
7373 where : {
74- userId : BigInt ( userId ) ,
74+ userId : userId ,
7575 isRead : false
7676 } ,
7777 data : {
@@ -93,7 +93,7 @@ class NotificationRepository {
9393 return await prisma . notification . deleteMany ( {
9494 where : {
9595 id : { in : bigIntIds } ,
96- userId : BigInt ( userId ) // 본인의 알림만 삭제 가능
96+ userId : userId // 본인의 알림만 삭제 가능
9797 }
9898 } ) ;
9999 }
@@ -105,7 +105,7 @@ class NotificationRepository {
105105 */
106106 async deleteAllNotificationsByUserId ( userId ) {
107107 return await prisma . notification . deleteMany ( {
108- where : { userId : BigInt ( userId ) }
108+ where : { userId : userId }
109109 } ) ;
110110 }
111111
@@ -116,7 +116,7 @@ class NotificationRepository {
116116 */
117117 async findUserById ( userId ) {
118118 return await prisma . user . findUnique ( {
119- where : { id : BigInt ( userId ) } ,
119+ where : { id : userId } ,
120120 select : {
121121 id : true ,
122122 nickname : true
0 commit comments