mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	refactor: 代码结构调整
This commit is contained in:
		
							
								
								
									
										25
									
								
								server/internal/mongo/domain/repository/mongo.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								server/internal/mongo/domain/repository/mongo.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
package repository
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"mayfly-go/internal/mongo/domain/entity"
 | 
			
		||||
	"mayfly-go/pkg/model"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Mongo interface {
 | 
			
		||||
	// 分页获取列表
 | 
			
		||||
	GetList(condition *entity.Mongo, pageParam *model.PageParam, toEntity interface{}, orderBy ...string) *model.PageResult
 | 
			
		||||
 | 
			
		||||
	Count(condition *entity.Mongo) int64
 | 
			
		||||
 | 
			
		||||
	// 根据条件获取
 | 
			
		||||
	Get(condition *entity.Mongo, cols ...string) error
 | 
			
		||||
 | 
			
		||||
	// 根据id获取
 | 
			
		||||
	GetById(id uint64, cols ...string) *entity.Mongo
 | 
			
		||||
 | 
			
		||||
	Insert(db *entity.Mongo)
 | 
			
		||||
 | 
			
		||||
	Update(db *entity.Mongo)
 | 
			
		||||
 | 
			
		||||
	Delete(id uint64)
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user