21 lines
896 B
Go
21 lines
896 B
Go
package ports
|
|
|
|
import (
|
|
"context"
|
|
|
|
"Yimaru-Backend/internal/domain"
|
|
)
|
|
|
|
type NotificationStore interface {
|
|
GetUserNotifications(ctx context.Context, recipientID int64, limit, offset int) ([]domain.Notification, int64, error)
|
|
CountUnreadNotifications(ctx context.Context, recipient_id int64) (int64, error)
|
|
GetAllNotifications(ctx context.Context, limit, offset int) ([]domain.Notification, error)
|
|
|
|
CreateNotification(ctx context.Context, notification *domain.Notification) (*domain.Notification, error)
|
|
MarkNotificationAsRead(ctx context.Context, id int64) (*domain.Notification, error)
|
|
MarkAllUserNotificationsAsRead(ctx context.Context, userID int64) error
|
|
MarkNotificationAsUnread(ctx context.Context, id int64) (*domain.Notification, error)
|
|
MarkAllUserNotificationsAsUnread(ctx context.Context, userID int64) error
|
|
DeleteUserNotifications(ctx context.Context, userID int64) error
|
|
}
|