mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 04:52:42 +01:00
commit
574e49c854
1 changed files with 4 additions and 0 deletions
|
@ -18,9 +18,11 @@ import (
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//NoticeType describes the notice type
|
||||||
type NoticeType int
|
type NoticeType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
//NoticeRepository type
|
||||||
NoticeRepository NoticeType = iota + 1
|
NoticeRepository NoticeType = iota + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,10 +35,12 @@ type Notice struct {
|
||||||
CreatedUnix int64
|
CreatedUnix int64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BeforeInsert is invoked from XORM before inserting an object of this type.
|
||||||
func (n *Notice) BeforeInsert() {
|
func (n *Notice) BeforeInsert() {
|
||||||
n.CreatedUnix = time.Now().Unix()
|
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) {
|
func (n *Notice) AfterSet(colName string, _ xorm.Cell) {
|
||||||
switch colName {
|
switch colName {
|
||||||
case "created_unix":
|
case "created_unix":
|
||||||
|
|
Loading…
Reference in a new issue