mirror of
https://github.com/ent/ent.git
synced 2026-05-03 08:00:58 +03:00
cmd/entc: add generate.go file to env init (#402)
* cmd/entc: add generate.go file to env init * doc: update getting-started and codegen documentation
This commit is contained in:
@@ -27,10 +27,12 @@ is to have an `ent` directory under the root directory of the project.
|
||||
## Generate Assets
|
||||
|
||||
After adding a few [fields](schema-fields.md) and [edges](schema-edges.md), you want to generate
|
||||
the assets for working with your entities. Run the following command:
|
||||
the assets for working with your entities. Run `entc generate` from the root directory of the project,
|
||||
or use `go generate`:
|
||||
|
||||
|
||||
```bash
|
||||
entc generate ./ent/schema
|
||||
go generate ./ent
|
||||
```
|
||||
|
||||
The `generate` command generates the following assets for the schemas:
|
||||
|
||||
Reference in New Issue
Block a user