Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-zero 生成的crud过于简单 #418

Open
vine2024 opened this issue Apr 28, 2024 · 0 comments
Open

go-zero 生成的crud过于简单 #418

vine2024 opened this issue Apr 28, 2024 · 0 comments
Assignees

Comments

@vine2024
Copy link

model interface {
Insert(ctx context.Context, data *Friendships) (sql.Result, error)
FindOne(ctx context.Context, id int64) (*Friendships, error)
Update(ctx context.Context, data *Friendships) error
Delete(ctx context.Context, id int64) error
}

目前生成的代码只有最基础的增删改查,还是只针对单条数据的,不能满足大多数应用场景,希望添加一些批处理的方法,例如:
1.根据条件获取列表
2.同时新增一批数据而不是单条。
3.crud的条件可以自定义,而不是固定只能用id来操作。

这些都是最基本的操作,希望能够实现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants