2022-09-27 17:59:05 +08:00
|
|
|
package report_common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-11-02 16:29:10 +08:00
|
|
|
|
2022-10-24 16:51:05 +08:00
|
|
|
"github.com/answerdev/answer/internal/entity"
|
|
|
|
"github.com/answerdev/answer/internal/schema"
|
2022-09-27 17:59:05 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// ReportRepo report repository
|
|
|
|
type ReportRepo interface {
|
|
|
|
AddReport(ctx context.Context, report *entity.Report) (err error)
|
|
|
|
GetReportListPage(ctx context.Context, query schema.GetReportListPageDTO) (reports []entity.Report, total int64, err error)
|
2022-12-16 16:35:55 +08:00
|
|
|
GetByID(ctx context.Context, id string) (report *entity.Report, exist bool, err error)
|
2022-09-27 17:59:05 +08:00
|
|
|
UpdateByID(ctx context.Context, id string, handleData entity.Report) (err error)
|
2022-11-02 16:29:10 +08:00
|
|
|
GetReportCount(ctx context.Context) (count int64, err error)
|
2022-09-27 17:59:05 +08:00
|
|
|
}
|