We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 21b7d30 + d8e11a8 commit 574e49cCopy full SHA for 574e49c
models/admin.go
@@ -18,9 +18,11 @@ import (
18
"code.gitea.io/gitea/modules/setting"
19
)
20
21
+//NoticeType describes the notice type
22
type NoticeType int
23
24
const (
25
+ //NoticeRepository type
26
NoticeRepository NoticeType = iota + 1
27
28
@@ -33,10 +35,12 @@ type Notice struct {
33
35
CreatedUnix int64
34
36
}
37
38
+// BeforeInsert is invoked from XORM before inserting an object of this type.
39
func (n *Notice) BeforeInsert() {
40
n.CreatedUnix = time.Now().Unix()
41
42
43
+// AfterSet is invoked from XORM after setting the value of a field of this object.
44
func (n *Notice) AfterSet(colName string, _ xorm.Cell) {
45
switch colName {
46
case "created_unix":
0 commit comments