38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成service操作代码。
|
|||
|
// 生成日期:2024-04-11 16:56:36
|
|||
|
// 生成路径: internal/app/system/service/notifications.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:通知信息
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package service
|
|||
|
|
|||
|
import (
|
|||
|
"context"
|
|||
|
"github.com/tiger1103/gfast/v3/api/v1/system"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
type INotifications interface {
|
|||
|
List(ctx context.Context, req *system.NotificationsSearchReq) (res *system.NotificationsSearchRes, err error)
|
|||
|
GetById(ctx context.Context, Id uint) (res *model.NotificationsInfoRes, err error)
|
|||
|
Add(ctx context.Context, req *system.NotificationsAddReq) (err error)
|
|||
|
Edit(ctx context.Context, req *system.NotificationsEditReq) (err error)
|
|||
|
Delete(ctx context.Context, Id []uint) (err error)
|
|||
|
}
|
|||
|
|
|||
|
var localNotifications INotifications
|
|||
|
|
|||
|
func Notifications() INotifications {
|
|||
|
if localNotifications == nil {
|
|||
|
panic("implement not found for interface INotifications, forgot register?")
|
|||
|
}
|
|||
|
return localNotifications
|
|||
|
}
|
|||
|
|
|||
|
func RegisterNotifications(i INotifications) {
|
|||
|
localNotifications = i
|
|||
|
}
|