Update Filter

This commit is contained in:
aditya.siregar
2024-07-30 19:38:23 +07:00
parent 065cfc4df6
commit c7495b8bff
7 changed files with 32 additions and 11 deletions
+4
View File
@@ -93,6 +93,10 @@ func (b *PartnerRepository) GetAll(ctx context.Context, req entity.PartnerSearch
query = query.Where("p.name ILIKE ?", "%"+req.Name+"%")
}
if req.PartnerID != nil {
query = query.Where("p.id = ?", req.PartnerID)
}
if req.Limit > 0 {
query = query.Limit(req.Limit)
}