Fixed compatibility with newer xorm version
Signed-off-by: Konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
e1779569f5
commit
301f247efe
|
|
@ -15,31 +15,9 @@ type IssueDependency struct {
|
||||||
IssueID int64 `xorm:"UNIQUE(watch) NOT NULL"`
|
IssueID int64 `xorm:"UNIQUE(watch) NOT NULL"`
|
||||||
DependencyID int64 `xorm:"UNIQUE(watch) NOT NULL"`
|
DependencyID int64 `xorm:"UNIQUE(watch) NOT NULL"`
|
||||||
Created time.Time `xorm:"-"`
|
Created time.Time `xorm:"-"`
|
||||||
CreatedUnix int64 `xorm:"NOT NULL"`
|
CreatedUnix int64 `xorm:"INDEX created"`
|
||||||
Updated time.Time `xorm:"-"`
|
Updated time.Time `xorm:"-"`
|
||||||
UpdatedUnix int64 `xorm:"NOT NULL"`
|
UpdatedUnix int64 `xorm:"updated"`
|
||||||
}
|
|
||||||
|
|
||||||
// BeforeInsert is invoked from XORM before inserting an object of this type.
|
|
||||||
func (iw *IssueDependency) BeforeInsert() {
|
|
||||||
var (
|
|
||||||
t = time.Now()
|
|
||||||
u = t.Unix()
|
|
||||||
)
|
|
||||||
iw.Created = t
|
|
||||||
iw.CreatedUnix = u
|
|
||||||
iw.Updated = t
|
|
||||||
iw.UpdatedUnix = u
|
|
||||||
}
|
|
||||||
|
|
||||||
// BeforeUpdate is invoked from XORM before updating an object of this type.
|
|
||||||
func (iw *IssueDependency) BeforeUpdate() {
|
|
||||||
var (
|
|
||||||
t = time.Now()
|
|
||||||
u = t.Unix()
|
|
||||||
)
|
|
||||||
iw.Updated = t
|
|
||||||
iw.UpdatedUnix = u
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateIssueDependency creates a new dependency for an issue
|
// CreateIssueDependency creates a new dependency for an issue
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user