enhance bug report handling with pagination, filtering, and improved response structure
This commit is contained in:
@@ -14,6 +14,11 @@ const (
|
||||
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"`
|
||||
|
||||
@@ -4,8 +4,6 @@ import "time"
|
||||
|
||||
type Session struct {
|
||||
ID string `db:"id" json:"id"`
|
||||
UserID int64 `db:"user_id" json:"user_id"`
|
||||
Token string `db:"token" json:"token"`
|
||||
UserID string `db:"user_id" json:"user_id"`
|
||||
ExpiresAt time.Time `db:"expires_at" json:"expires_at"`
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
}
|
||||
|
||||
@@ -10,12 +10,11 @@ const (
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ID int64 `db:"id" json:"id"`
|
||||
ID string `db:"id" json:"id"`
|
||||
Username string `db:"username" json:"username"`
|
||||
Email string `db:"email" json:"email"`
|
||||
Displayname string `db:"displayname" json:"displayname"`
|
||||
PasswordHash string `db:"password_hash" json:"-"`
|
||||
Role UserRole `db:"role" json:"role"`
|
||||
Enabled bool `db:"enabled" json:"enabled"`
|
||||
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