A community based topic aggregation platform built on atproto
1package adminreports
2
3import "context"
4
5// Repository defines the data access layer for admin reports
6type Repository interface {
7 // Create stores a new report in the database
8 // Returns the report with ID populated after successful creation
9 Create(ctx context.Context, report *Report) error
10
11 // ListByStatus returns reports filtered by status with pagination
12 ListByStatus(ctx context.Context, status string, limit, offset int) ([]*Report, error)
13
14 // UpdateStatus updates a report's status and resolution details
15 UpdateStatus(ctx context.Context, id int64, status, resolvedBy, notes string) error
16}
17
18// SubmitReportResult contains the result of submitting a report
19type SubmitReportResult struct {
20 // ReportID is the ID of the created report
21 ReportID int64
22}
23
24// Service defines the business logic layer for admin reports
25type Service interface {
26 // SubmitReport validates and creates a new report
27 // Returns the report ID on success
28 SubmitReport(ctx context.Context, req SubmitReportRequest) (*SubmitReportResult, error)
29}