summaryrefslogtreecommitdiffstats
path: root/models/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/admin.go')
-rw-r--r--models/admin.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/models/admin.go b/models/admin.go
index f8645202d8..eb78f6e865 100644
--- a/models/admin.go
+++ b/models/admin.go
@@ -29,12 +29,7 @@ type Notice struct {
Type NoticeType
Description string `xorm:"TEXT"`
Created time.Time `xorm:"-"`
- CreatedUnix int64 `xorm:"INDEX"`
-}
-
-// BeforeInsert is invoked from XORM before inserting an object of this type.
-func (n *Notice) BeforeInsert() {
- n.CreatedUnix = time.Now().Unix()
+ CreatedUnix int64 `xorm:"INDEX created"`
}
// AfterSet is invoked from XORM after setting the value of a field of this object.