summaryrefslogtreecommitdiffstats
path: root/models/admin.go
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2016-11-24 21:54:00 +0100
committerBwko <bouwko@gmail.com>2016-11-24 23:42:07 +0100
commitd8e11a8eaa0a8712024426348d4f7b430cea9e3a (patch)
tree7e549958c482a956b849b89ab422ecd1cca5844b /models/admin.go
parent21e8deed897a99fc86cd6506ce1bf4a9a8c07fba (diff)
downloadgitea-d8e11a8eaa0a8712024426348d4f7b430cea9e3a.tar.gz
gitea-d8e11a8eaa0a8712024426348d4f7b430cea9e3a.zip
Lint models/admin.go
Diffstat (limited to 'models/admin.go')
-rw-r--r--models/admin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/admin.go b/models/admin.go
index 14a0e8d009..058e9be8a8 100644
--- a/models/admin.go
+++ b/models/admin.go
@@ -18,9 +18,11 @@ import (
"code.gitea.io/gitea/modules/setting"
)
+//NoticeType describes the notice type
type NoticeType int
const (
+ //NoticeRepository type
NoticeRepository NoticeType = iota + 1
)
@@ -33,10 +35,12 @@ type Notice struct {
CreatedUnix int64
}
+// BeforeInsert is invoked from XORM before inserting an object of this type.
func (n *Notice) BeforeInsert() {
n.CreatedUnix = time.Now().Unix()
}
+// AfterSet is invoked from XORM after setting the value of a field of this object.
func (n *Notice) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "created_unix":