初步完成举报功能
This commit is contained in:
@@ -79,3 +79,21 @@ type ClientRepository interface {
|
||||
DeleteByClientToken(ctx context.Context, clientToken string) error
|
||||
DeleteByUserID(ctx context.Context, userID int64) error
|
||||
}
|
||||
|
||||
// ReportRepository 举报仓储接口
|
||||
type ReportRepository interface {
|
||||
Create(ctx context.Context, report *model.Report) error
|
||||
FindByID(ctx context.Context, id int64) (*model.Report, error)
|
||||
FindByReporterID(ctx context.Context, reporterID int64, page, pageSize int) ([]*model.Report, int64, error)
|
||||
FindByTarget(ctx context.Context, targetType model.ReportType, targetID int64, page, pageSize int) ([]*model.Report, int64, error)
|
||||
FindByStatus(ctx context.Context, status model.ReportStatus, page, pageSize int) ([]*model.Report, int64, error)
|
||||
Search(ctx context.Context, keyword string, page, pageSize int) ([]*model.Report, int64, error)
|
||||
Update(ctx context.Context, report *model.Report) error
|
||||
UpdateFields(ctx context.Context, id int64, fields map[string]interface{}) error
|
||||
Review(ctx context.Context, id int64, status model.ReportStatus, reviewerID int64, reviewNote string) error
|
||||
BatchReview(ctx context.Context, ids []int64, status model.ReportStatus, reviewerID int64, reviewNote string) (int64, error)
|
||||
Delete(ctx context.Context, id int64) error
|
||||
BatchDelete(ctx context.Context, ids []int64) (int64, error)
|
||||
CountByStatus(ctx context.Context, status model.ReportStatus) (int64, error)
|
||||
CheckDuplicate(ctx context.Context, reporterID int64, targetType model.ReportType, targetID int64) (bool, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user