entc/gen: support merging dep annotations

This will make it possible to get dependencies
from external extensions.
This commit is contained in:
Ariel Mashraki
2021-10-27 23:21:19 +03:00
committed by Ariel Mashraki
parent 4f331e0090
commit 909d24cfc4
5 changed files with 110 additions and 95 deletions

View File

@@ -159,10 +159,10 @@ func (a Annotation) Merge(other schema.Annotation) schema.Annotation {
return a
}
var (
_ schema.Annotation = (*Annotation)(nil)
_ schema.Merger = (*Annotation)(nil)
)
var _ interface {
schema.Annotation
schema.Merger
} = (*Annotation)(nil)
// ReferenceOption for constraint actions.
type ReferenceOption string