feat: search

This commit is contained in:
2025-03-15 18:54:09 +07:00
parent 33b0eaca3d
commit 9a7c5ca1fe
6 changed files with 21 additions and 19 deletions

View File

@@ -63,3 +63,6 @@ func (service *PostTypeService) Count() (int64, error) {
func (service *PostTypeService) SortedByOrder(fieldsSortOrder []utils.SortField) ([]*PostType, error) {
return utils.SortByOrder(fieldsSortOrder, PostType{})
}
func (service *PostTypeService) SearchByAllTextFields(phrase string) ([]*PostType, error) {
return utils.FindPhraseByStringFields[PostType](phrase, PostType{})
}