mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-17 23:00:24 +08:00
refactor: 新增base.Repo与base.App,重构repo与app层代码
This commit is contained in:
@@ -2,24 +2,13 @@ package repository
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/db/domain/entity"
|
||||
"mayfly-go/pkg/base"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
type Instance interface {
|
||||
base.Repo[*entity.Instance]
|
||||
|
||||
// 分页获取数据库实例信息列表
|
||||
GetInstanceList(condition *entity.InstanceQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) *model.PageResult[any]
|
||||
|
||||
Count(condition *entity.InstanceQuery) int64
|
||||
|
||||
// 根据条件获取实例信息
|
||||
GetInstance(condition *entity.Instance, cols ...string) error
|
||||
|
||||
// 根据id获取
|
||||
GetById(id uint64, cols ...string) *entity.Instance
|
||||
|
||||
Insert(db *entity.Instance)
|
||||
|
||||
Update(db *entity.Instance)
|
||||
|
||||
Delete(id uint64)
|
||||
GetInstanceList(condition *entity.InstanceQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user