refactor notifications service
This commit is contained in:
1 parent
5b43d9d173
commit
d627a25b40
13 files changed
+132
-47
No files matched your search
@@ -1,8 +1,13 @@
|
||||
import type { Notification } from "@/types/index.js";
|
||||
export interface INotificationsRepository {
|
||||
// create
|
||||
create(notificationData: Partial<Notification>): Promise<Notification>;
|
||||
// fetch
|
||||
findById(id: string, teamId: string): Promise<Notification>;
|
||||
findNotificationsByIds(ids: string[]): Promise<Notification[]>;
|
||||
findByTeamId(teamId: string): Promise<Notification[]>;
|
||||
// update
|
||||
updateById(id: string, teamId: string, updateData: Partial<Notification>): Promise<Notification>;
|
||||
// delete
|
||||
deleteById(id: string, teamId: string): Promise<Notification>;
|
||||
}
|
||||
Reference in new issue
Block a user