Filter field getters
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user