fix: types in m2m

This commit is contained in:
2025-03-16 18:59:27 +07:00
parent 4769971b56
commit 4b5580b1c8
17 changed files with 47 additions and 330 deletions

10
common/model_methods.go Normal file
View File

@@ -0,0 +1,10 @@
package common
func (model *Model) HasPrimaryKey() bool {
for _, field := range model.Fields {
if field.Tags.HasParam("primaryKey") || field.Tags.HasOption("primaryKey") {
return true
}
}
return false
}