nezha/model/common.go
UUBulb 3efbf9cce1
disable soft deletion in group api (#10)
* disable soft deletion in group api

* remove DeleteAt

* remove DeleteAt service
2024-11-19 21:41:21 +08:00

22 lines
570 B
Go

package model
import (
"time"
)
const CtxKeyAuthorizedUser = "ckau"
type Common struct {
ID uint64 `gorm:"primaryKey" json:"id,omitempty"`
CreatedAt time.Time `gorm:"index;<-:create" json:"created_at,omitempty"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at,omitempty"`
// Do not use soft deletion
// DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
}
type Response struct {
Code int `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Result interface{} `json:"result,omitempty"`
}