mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
doc/md: add missing imports for getting-started page (#1934)
This commit is contained in:
@@ -49,6 +49,8 @@ The command above will generate the schema for `User` under `<project>/ent/schem
|
||||
|
||||
package schema
|
||||
|
||||
import "entgo.io/ent"
|
||||
|
||||
// User holds the schema definition for the User entity.
|
||||
type User struct {
|
||||
ent.Schema
|
||||
@@ -72,6 +74,11 @@ Add 2 fields to the `User` schema:
|
||||
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Fields of the User.
|
||||
func (User) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
|
||||
Reference in New Issue
Block a user