2019-12-08 03:59:58 -05:00
|
|
|
package model
|
|
|
|
|
2022-04-26 00:46:44 -04:00
|
|
|
import (
|
|
|
|
"time"
|
2022-10-24 00:12:51 -04:00
|
|
|
|
|
|
|
"gorm.io/gorm"
|
2022-04-26 00:46:44 -04:00
|
|
|
)
|
2019-12-08 03:59:58 -05:00
|
|
|
|
2019-12-20 10:58:09 -05:00
|
|
|
const CtxKeyAuthorizedUser = "ckau"
|
2019-12-08 03:59:58 -05:00
|
|
|
|
|
|
|
type Common struct {
|
2024-10-20 02:05:43 -04:00
|
|
|
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"`
|
|
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
|
2019-12-08 03:59:58 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type Response struct {
|
2021-08-10 08:13:17 -04:00
|
|
|
Code int `json:"code,omitempty"`
|
2019-12-08 03:59:58 -05:00
|
|
|
Message string `json:"message,omitempty"`
|
|
|
|
Result interface{} `json:"result,omitempty"`
|
|
|
|
}
|