Setting Up

    Next, we use to invoke the ent code generator to initialize a schema:

      Our directory should now look like:

        Next, we will define the schema for the entity. Open ent/schema/user.go and edit:

        ent/schema/user.go

          Notice that new files were created from our schema definition:

          At this point, we can open a connection to a database, run a migration to create the users table, and start reading and writing data to it. This is covered on the Setup Tutorial, so let’s cut to the chase and learn about generating Protobuf definitions and gRPC servers from our schema.