init layout
This commit is contained in:
committed by
Евстигнеев Денис Сергеевич
parent
5aec0a0895
commit
fb0ad62f0e
37
models/entities.go
Normal file
37
models/entities.go
Normal file
@@ -0,0 +1,37 @@
|
||||
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"`
|
||||
}
|
Reference in New Issue
Block a user