# README
simple admin example rpc v1.7.3 gen by goctls v1.7.3
只需运行如下命令即可生成这个rpc项目模板
You just need to run the command below to generate this project
goctls rpc new example --ent=true --module_name=github.com/suyuan32/simple-admin-example-rpc --port=8080 --desc=true --i18n=true
# or
# goctls rpc new example -e -m github.com/suyuan32/simple-admin-example-rpc -p 8080 -d -i
cd example
go mod tidy
在
ent/schema
文件夹添加 student 和 teacher, 参考 example 中的 schema
Add student and teacher schema toent/schema
, you can find it in example'sent/schema
directory
运行如下命令生成 CRUD 代码
Run the command below to generate CRUD code
# 如果 make gen-ent 报错, 执行 go mod tidy | If there ig error when run make gen-ent command, run go mod tidy command.
make gen-ent
make gen-rpc-ent-logic model=Student group=student
make gen-rpc-ent-logic model=Teacher group=teacher
make gen-rpc
运行服务 | Run codes
go run example.go -f etc/example.yaml
# Packages
No description provided by the author
No description provided by the author
No description provided by the author