mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
Merge pull request #254 from qcgzxw/bug
fix: 更新导致创建日期归零 Co-authored-by: qcgzxw <24518597+qcgzxw@users.noreply.github.com>
This commit is contained in:
commit
ca381d566f
@ -2,6 +2,8 @@ package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const CtxKeyAuthorizedUser = "ckau"
|
||||
@ -10,9 +12,9 @@ const CacheKeyOauth2State = "p:a:state"
|
||||
|
||||
type Common struct {
|
||||
ID uint64 `gorm:"primaryKey"`
|
||||
CreatedAt time.Time `sql:"index"`
|
||||
UpdatedAt time.Time
|
||||
DeletedAt *time.Time `sql:"index"`
|
||||
CreatedAt time.Time `gorm:"index;<-:create"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
|
Loading…
Reference in New Issue
Block a user