mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
docs: fix link to Annotation interface (#1160)
This commit is contained in:
@@ -5,7 +5,7 @@ title: Annotations
|
||||
|
||||
Schema annotations allow attaching metadata to schema objects like fields and edges and inject them to external templates.
|
||||
An annotation must be a Go type that is serializable to JSON raw value (e.g. struct, map or slice)
|
||||
and implement the [Annotation](https://pkg.go.dev/github.com/facebook/ent/schema/field?tab=doc#Annotation) interface.
|
||||
and implement the [Annotation](https://pkg.go.dev/github.com/facebook/ent/schema?tab=doc#Annotation) interface.
|
||||
|
||||
The builtin annotations allow configuring the different storage drivers (like SQL) and control the code generation output.
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ In order to override an existing template, use its name. For example:
|
||||
## Annotations
|
||||
Schema annotations allow attaching metadata to fields and edges and inject them to external templates.
|
||||
An annotation must be a Go type that is serializable to JSON raw value (e.g. struct, map or slice)
|
||||
and implement the [Annotation](https://pkg.go.dev/github.com/facebook/ent/schema/field?tab=doc#Annotation) interface.
|
||||
and implement the [Annotation](https://pkg.go.dev/github.com/facebook/ent/schema?tab=doc#Annotation) interface.
|
||||
|
||||
Here's an example of an annotation and its usage in schema and template:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user