feat: sorting

This commit is contained in:
2025-03-12 15:57:30 +07:00
parent 43c4fe36c0
commit e1012c234c
2 changed files with 12 additions and 6 deletions

View File

@@ -54,3 +54,7 @@ const CountRawTemplate = `func (service *{{.ServiceName}}) Count() (int64, error
amount, err := dal.{{.EntityType}}.Count()
return amount, err
}`
const SortedByOrderTemplate = `func (service *{{.ServiceName}}) SortedByOrder(fieldsSortOrder map[string]string) ([]*{{.EntityType}}, error) {
return utils.SortByOrder(fieldsSortOrder, {{.EntityType}}{})
}`