add initial project structure with configuration, models, and API key authentication
This commit is contained in:
26
internal/models/bug_report.go
Normal file
26
internal/models/bug_report.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
type BugReportStatus string
|
||||
|
||||
const (
|
||||
BugReportStatusOpen BugReportStatus = "open"
|
||||
BugReportStatusInProgress BugReportStatus = "in_progress"
|
||||
BugReportStatusResolved BugReportStatus = "resolved"
|
||||
BugReportStatusClosed BugReportStatus = "closed"
|
||||
)
|
||||
|
||||
type BugReport struct {
|
||||
ID int64 `db:"id" json:"id"`
|
||||
UserID *int64 `db:"user_id" json:"user_id"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Description string `db:"description" json:"description"`
|
||||
Status BugReportStatus `db:"status" json:"status"`
|
||||
SystemInfo json.RawMessage `db:"system_info" json:"system_info,omitempty"`
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user