52 lines
808 B
Go
52 lines
808 B
Go
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
|
|
}
|
|
|
|
|