mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 23:00:33 +07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bff39d2c75 | ||
|
|
db5bf3bae0 | ||
| 199fe0a823 |
@@ -1,8 +1,8 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/opbnq-q/nto-cli/model"
|
||||
"log"
|
||||
"nto_cli/model"
|
||||
"os"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package generation
|
||||
|
||||
import (
|
||||
"github.com/opbnq-q/nto-cli/model"
|
||||
"github.com/opbnq-q/nto-cli/utils"
|
||||
"log"
|
||||
"nto_cli/model"
|
||||
"nto_cli/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -3,9 +3,9 @@ package generation
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"github.com/opbnq-q/nto-cli/model"
|
||||
"github.com/opbnq-q/nto-cli/utils"
|
||||
"log"
|
||||
"nto_cli/model"
|
||||
"nto_cli/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -3,9 +3,9 @@ package generation
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"github.com/opbnq-q/nto-cli/model"
|
||||
"github.com/opbnq-q/nto-cli/utils"
|
||||
"log"
|
||||
"nto_cli/model"
|
||||
"nto_cli/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -34,6 +34,15 @@ export default class {{.ModelName}}Service implements IService<{{.ModelName}}> {
|
||||
}
|
||||
|
||||
async sort(options: SortOptions<{{ .ModelName }}>) {
|
||||
return await SortedByOrder(Object.entries(options).map(item => ({Name: item[0], Order: item[1]}))) as {{ .ModelName }}[]
|
||||
return (await SortedByOrder(
|
||||
Object.entries(options).map((item) => {
|
||||
if (item[1] !== 'NONE') {
|
||||
return ({
|
||||
Name: item[0],
|
||||
Order: item[1],
|
||||
})
|
||||
}
|
||||
}).filter(item => !!item)
|
||||
)) as {{ .ModelName }}[];
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package model
|
||||
|
||||
import "nto_cli/utils"
|
||||
import "github.com/opbnq-q/nto-cli/utils"
|
||||
|
||||
func GetNotImplementedModels(models []Model) []Model {
|
||||
var unimplementedModels []Model
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/opbnq-q/nto-cli/utils"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"log/slog"
|
||||
"nto_cli/utils"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
Reference in New Issue
Block a user