enhance bug report handling with pagination, filtering, and improved response structure

This commit is contained in:
Flavio Fois
2026-03-19 09:00:07 +01:00
parent 9df575067a
commit da650c2b82
13 changed files with 708 additions and 16 deletions

View File

@@ -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"`

View File

@@ -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"`
}

View File

@@ -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"`
}