initial commit
This commit is contained in:
51
internal/domain/asset/report.go
Normal file
51
internal/domain/asset/report.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package asset
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
//go:generate stringer -type=ReportStatus
|
||||
type ReportStatus int
|
||||
|
||||
const (
|
||||
ReportStatusPending ReportStatus = iota
|
||||
ReportStatusReviewed
|
||||
ReportStatusResolved
|
||||
ReportStatusDismissed
|
||||
)
|
||||
|
||||
type Report struct {
|
||||
ID uuid.UUID
|
||||
AssetID uuid.UUID
|
||||
ReportedBy ReportedBy
|
||||
ReportedAt time.Time
|
||||
Reason ReportReason
|
||||
Status ReportStatus
|
||||
Notes string
|
||||
Attachments []Attachment
|
||||
}
|
||||
|
||||
type ReportedBy struct {
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
Description string
|
||||
RestOfFields json.RawMessage
|
||||
}
|
||||
|
||||
type ReportReason struct {
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
Description string
|
||||
RestOfFields json.RawMessage
|
||||
}
|
||||
|
||||
type Attachment struct {
|
||||
ID uuid.UUID
|
||||
URL string
|
||||
Type string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user