You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
483 B
Go

package types
import (
"gorm.io/gorm"
)
// BaseDbModel 数据库通用字段
type BaseDbModel struct {
Id int `json:"id" gorm:"primarykey"`
CreatedAt DateTime `json:"createdAt"`
UpdatedAt DateTime `json:"updatedAt"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index:deleted"`
}
type Model struct {
CreatedAt DateTime `json:"createdAt"`
UpdatedAt DateTime `json:"updatedAt"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index:deleted"`
}