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

@@ -61,6 +61,9 @@ func (service *CommentService) Count() (int64, error) {
amount, err := dal.Comment.Count()
return amount, err
}
func (service *CommentService) SortedByOrder(fieldsSortOrder []utils.SortField) ([]*Comment, error) {
return utils.SortByOrder(fieldsSortOrder, Comment{})
func (service *CommentService) SortedByOrder(fieldsSortingOrder []utils.SortField) ([]*Comment, error) {
return utils.SortByOrder(fieldsSortingOrder, Comment{})
}
func (service *CommentService) SearchByAllTextFields(phrase string) ([]*Comment, error) {
return utils.FindPhraseByStringFields[Comment](phrase, Comment{})
}