-
Notifications
You must be signed in to change notification settings - Fork 0
/
tech.go
46 lines (38 loc) · 1.42 KB
/
tech.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package tech
import (
"gopkg.in/mgo.v2/bson"
"time"
)
type Tech struct {
Categories []Category `json:"categories,omitempty"`
Name string `json:"name"`
Version string `json:"version"`
Confidence int `json:"confidence"`
Icon string `json:"icon,omitempty" description:"base64 image"`
Url string `json:"url" description:"url to technology"`
}
type Status struct {
Confirmed bool `json:"confirmed"`
False bool `json:"false"`
}
type TargetTech struct {
Id bson.ObjectId `json:"id,omitempty" bson:"_id"`
Target bson.ObjectId `json:"target"`
Project bson.ObjectId `json:"project"`
Created time.Time `json:"created,omitempty" description:"when issue is created"`
Updated time.Time `json:"updated,omitempty" description:"when issue is updated"`
Activities []*Activity `json:"activities,omitempty"`
Tech `json:",inline"`
Status `json:",inline"`
}
type Report struct {
Report bson.ObjectId `json:"report"`
Scan bson.ObjectId `json:"scan,omitempty" description:"scan id"`
Session bson.ObjectId `json:"session,omitempty" bson:"session" description:"scan session id"`
}
type Activity struct {
Type ActivityType `json:"type"`
Created time.Time `json:"created"`
User bson.ObjectId `json:"user,omitempty" description:"who did the activity"`
Report *Report `json:"report,omitempty" description:"link to report for reported activity"`
}