mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
gorm: CreatedAt index
This commit is contained in:
parent
011fc2340a
commit
51655a09a1
@ -1,8 +1,9 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const CtxKeyAuthorizedUser = "ckau"
|
||||
@ -11,7 +12,7 @@ const CacheKeyOauth2State = "p:a:state"
|
||||
|
||||
type Common struct {
|
||||
ID uint64 `gorm:"primaryKey"`
|
||||
CreatedAt time.Time `gorm:"<-:create"`
|
||||
CreatedAt time.Time `gorm:"index;<-:create"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user