feat: client 增删改查
This commit is contained in:
+4
-4
@@ -6,10 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type BaseModel struct {
|
||||
ID uint `gorm:"primarykey" json:"ID"` // 主键ID
|
||||
CreatedAt time.Time // 创建时间
|
||||
UpdatedAt time.Time // 更新时间
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 删除时间
|
||||
Id uint `gorm:"primarykey" json:"id"` // 主键ID
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt"` // 删除时间
|
||||
}
|
||||
|
||||
// BeforeCreate 定义一个钩子,在创建之前执行自动插入字段
|
||||
|
||||
Reference in New Issue
Block a user