feat: many-to-one check, constrints check

This commit is contained in:
2025-03-17 13:13:35 +07:00
parent 4b5580b1c8
commit 60e0a64a24
6 changed files with 168 additions and 18 deletions

View File

@@ -8,3 +8,12 @@ func (model *Model) HasPrimaryKey() bool {
}
return false
}
func (model *Model) HasField(name string) bool {
for _, field := range model.Fields {
if field.Name == name {
return true
}
}
return false
}