Filter field getters

This commit is contained in:
Eden Kirin
2024-06-19 11:49:47 +02:00
parent 0a0ed77794
commit 0fb5d637dd
3 changed files with 136 additions and 16 deletions

View File

@ -7,7 +7,9 @@ import (
"repo-pattern/app/lib/logging"
"repo-pattern/app/models"
"repo-pattern/app/repository"
"repo-pattern/app/repository/smartfilter"
"github.com/google/uuid"
"gorm.io/gorm"
)
@ -20,8 +22,11 @@ func doMagic(db *gorm.DB) {
var err error
query := db
f := repository.SmartCertFilter[models.Cert]{
id, _ := uuid.FromBytes([]byte("6dc096ab-5c03-427e-b808-c669f7446131"))
f := smartfilter.SmartCertFilter[models.Cert]{
Alive: &TRUE,
Id: &id,
}
query, err = f.ToQuery(query)