A:增加“资料库”;增加模型注入
This commit is contained in:
1 parent
b8dc199cff
commit
592b01a89b
10 files changed
+250
-68
No files matched your search
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
// BaseModel 基础模型,包含通用字段
|
||||
type BaseModel struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
// 软删除 【查询时会检测删除时间】
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
IsDeleted bool `json:"is_deleted"`
|
||||
}
|
||||
Reference in new issue
Block a user