MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / Delete

Method Delete

model/user.go:391–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389}
390
391func (user *User) Delete() error {
392 if user.Id == 0 {
393 return errors.New("id 为空!")
394 }
395 if err := DB.Delete(user).Error; err != nil {
396 return err
397 }
398
399 // 清除缓存
400 return invalidateUserCache(user.Id)
401}
402
403func (user *User) HardDelete() error {
404 if user.Id == 0 {

Callers 11

ManageUserFunction · 0.95
DeleteUserByIdFunction · 0.95
MigrateConsoleSettingFunction · 0.45
startCleanupTaskFunction · 0.45
DeleteAbilitiesMethod · 0.45
UpdateAbilitiesMethod · 0.45
FixAbilityFunction · 0.45
DeleteOldLogFunction · 0.45
DeleteLogsByTimeRangeFunction · 0.45
HardDeleteUserByIdFunction · 0.45
HardDeleteMethod · 0.45

Calls 1

invalidateUserCacheFunction · 0.85

Tested by

no test coverage detected