36 lines
1.2 KiB
Go
36 lines
1.2 KiB
Go
package models
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
type BugReportStatus string
|
|
|
|
const (
|
|
BugReportStatusNew BugReportStatus = "new"
|
|
BugReportStatusInReview BugReportStatus = "in_review"
|
|
BugReportStatusResolved BugReportStatus = "resolved"
|
|
BugReportStatusClosed BugReportStatus = "closed"
|
|
)
|
|
|
|
type BugReportListItem struct {
|
|
BugReport
|
|
FileCount int `db:"file_count" json:"file_count"`
|
|
}
|
|
|
|
type BugReport struct {
|
|
ID uint64 `db:"id" json:"id"`
|
|
Name string `db:"name" json:"name"`
|
|
Email string `db:"email" json:"email"`
|
|
Description string `db:"description" json:"description"`
|
|
HWID string `db:"hwid" json:"hwid"`
|
|
Hostname string `db:"hostname" json:"hostname"`
|
|
OsUser string `db:"os_user" json:"os_user"`
|
|
SubmitterIP string `db:"submitter_ip" json:"submitter_ip"`
|
|
SystemInfo json.RawMessage `db:"system_info" json:"system_info,omitempty"`
|
|
Status BugReportStatus `db:"status" json:"status"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
|
}
|