add dao testing cases

This commit is contained in:
yanghao05
2023-02-04 18:53:17 +08:00
parent 1c2b861ac7
commit 2fb6bba903
21 changed files with 464 additions and 12 deletions

11
utils/db.go Normal file
View File

@@ -0,0 +1,11 @@
package utils
import (
"fmt"
"gorm.io/gorm"
)
func TruncateTable(db *gorm.DB, table string) {
db.Exec(fmt.Sprintf("TRUNCATE TABLE %s", table))
}