diff --git a/link_homework/internal/service/homework.go b/link_homework/internal/service/homework.go new file mode 100644 index 0000000..7c0b2d2 --- /dev/null +++ b/link_homework/internal/service/homework.go @@ -0,0 +1,37 @@ +// ================================================================================ +// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. +// You can delete these comments if you wish manually maintain this interface file. +// ================================================================================ + +package service + +import ( + "context" + "link_homework/api/v1/homework" + "link_homework/internal/model/entity" +) + +type ( + IHomework interface { + GetHomeworkList(ctx context.Context, pageNo int, pageSize int) (homeworkList []*entity.ActivityInteractiveGroup, err error) + GetHomeworkListTotal(ctx context.Context) (total int, err error) + GetHomework(ctx context.Context, id int) (homework *entity.ActivityInteractiveGroup, err error) + AddHomework(ctx context.Context, req *homework.AddHomeworkReq) (err error) + EditHomework(ctx context.Context, req *homework.EditHomeworkReq) (err error) + } +) + +var ( + localHomework IHomework +) + +func Homework() IHomework { + if localHomework == nil { + panic("implement not found for interface IHomework, forgot register?") + } + return localHomework +} + +func RegisterHomework(i IHomework) { + localHomework = i +}