feat: delete constraint for belongs to and has one

This commit is contained in:
2025-03-18 03:29:00 +07:00
parent 4536be4d10
commit ffbeccc4fd
4 changed files with 10 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ import (
func CheckCascadeDelete(pass *analysis.Pass, field common.Field) bool {
if !field.Tags.HasParam("constraint") {
pass.Reportf(field.Pos, "field %s should have a constraint", field.Name)
pass.Reportf(field.Pos, "field %s should have a delete constraint", field.Name)
return true
}
constraintValue := field.Tags.GetParam("constraint").Value