info get profile
This commit is contained in:
@@ -191,3 +191,12 @@ func MetadataOrderPATCH(tx *gorm.DB, sql string, orderSn string, tableStructPoin
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetGormTableName(tx *gorm.DB, tableStructPointer any) string {
|
||||
stype := reflect.TypeOf(tableStructPointer)
|
||||
if stype.Kind() == reflect.Pointer {
|
||||
stype = stype.Elem()
|
||||
}
|
||||
tname := tx.NamingStrategy.TableName(stype.Name())
|
||||
return tname
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user