17 lines
306 B
Go
17 lines
306 B
Go
package robot
|
|
|
|
import (
|
|
"wechat-robot/internal/database"
|
|
"wechat-robot/model/entity"
|
|
)
|
|
|
|
// DeleteById
|
|
// @description: 删除机器人
|
|
// @param id
|
|
// @return err
|
|
func DeleteById(id string) (err error) {
|
|
// 删除数据
|
|
err = database.Client.Where("id = ?", id).Delete(&entity.Robot{}).Error
|
|
return
|
|
}
|