add handle: addComment;addPackage storage:ListPackage;AddComment;AddPackage

This commit is contained in:
2023-08-10 12:38:55 +03:00
parent bbb9174d8a
commit 92153397a0
22 changed files with 889 additions and 672 deletions

View File

@@ -7,12 +7,12 @@ import (
)
type Package struct {
ID int64 `db:"id"` // package id
Name string `db:"name"` // service name, last component path
URL string `db:"url"` // scm url
Modules []Module `db:"modules"` // parsed go.mod modules
Issues []Issue `db:"issues"` // issues list
Comments []int64 `db:"comments"`
ID int64 `db:"id" json:"id"` // package id
Name string `db:"name" json:"name"` // service name, last component path
URL string `db:"url" json:"url"` // scm url
Modules []int64 `db:"modules" json:"modules"` // parsed go.mod modules
Issues []int64 `db:"issues" json:"issues,omitempty"` // issues list
Comments []int64 `db:"comments" json:"comments,omitempty"`
}
type Module struct {
@@ -31,14 +31,14 @@ type Issue struct {
}
type Comment struct {
ID int64 `db:"id"`
Text string `db:"value"`
Created pgtype.Date `db:"created"`
Updated pgtype.Date `db:"updated"`
ID int64 `db:"id" json:"id"`
Text string `db:"value" json:"text"`
Created pgtype.Date `db:"created" json:"created"`
Updated pgtype.Date `db:"updated" json:"updated,omitempty"`
}
type Dashboard struct {
ID int64 `db:"id"`
Uuid uuid.UUID `db:"uuid"`
Package int64 `db:"package"`
ID int64 `db:"id"`
Uuid uuid.UUID `db:"uuid"`
Packages []int64 `db:"package"`
}