package models import ( _ "database/sql" "github.com/jackc/pgtype" ) type DBPackage struct { Name string `db:"name"` // service name, last component path URL string `db:"url"` // scm url Modules []DBModule `db:"modules"` // parsed go.mod modules ID int64 `db:"id"` // package id Issues []DBIssue `db:"issues"` // issues list } type DBModule struct { Name string `db:"name"` // module name Version string `db:"version"` // module ID int64 `db:"id"` Package int64 `db:"package"` } type DBIssue struct { ID int64 `db:"id"` Package int64 `db:"package"` Modules []int64 `db:"modules"` Status int64 `db:"status"` Desc string `db:"desc"` } type DBComment struct { ID int64 `db:"id"` Package int64 `db:"package"` Text string `db:"value"` Created pgtype.Date `db:"created"` Updated pgtype.Date `db:"updated"` }