Compare commits
1 Commits
43c4fe36c0
...
v1.0.8
| Author | SHA1 | Date | |
|---|---|---|---|
| e1012c234c |
@@ -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}}{})
|
||||
}`
|
||||
|
||||
@@ -22,6 +22,7 @@ const GetByIdMethod = "GetById"
|
||||
const UpdateMethod = "Update"
|
||||
const DeleteMethod = "Delete"
|
||||
const CountMethod = "Count"
|
||||
const SortedByOrderMethod = "SortedByOrder"
|
||||
|
||||
var RawTemplates = map[string]string{
|
||||
CreateMethod: CreateRawTemplate,
|
||||
@@ -30,4 +31,5 @@ var RawTemplates = map[string]string{
|
||||
UpdateMethod: UpdateRawTemplate,
|
||||
DeleteMethod: DeleteRawTemplate,
|
||||
CountMethod: CountRawTemplate,
|
||||
SortedByOrderMethod: SortedByOrderTemplate,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user