26 lines
780 B
Go
26 lines
780 B
Go
package repository
|
|
|
|
import (
|
|
"backend/pkg/permission/domain/entity"
|
|
"context"
|
|
mongodriver "go.mongodb.org/mongo-driver/v2/mongo"
|
|
)
|
|
|
|
// ClientRepository 客戶端倉庫介面
|
|
type ClientRepository interface {
|
|
Create(ctx context.Context, client *entity.Client) error
|
|
GetByID(ctx context.Context, id string) (*entity.Client, error)
|
|
GetByClientID(ctx context.Context, clientID string) (*entity.Client, error)
|
|
Update(ctx context.Context, id string, client *entity.Client) error
|
|
Delete(ctx context.Context, id string) error
|
|
List(ctx context.Context, filter ClientFilter) ([]*entity.Client, error)
|
|
Index20241226001UP(ctx context.Context) (*mongodriver.Cursor, error)
|
|
}
|
|
|
|
// ClientFilter 客戶端查詢過濾器
|
|
type ClientFilter struct {
|
|
Status *int
|
|
Limit int
|
|
Skip int
|
|
}
|