mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Feat(BE-36,37,38,39): finish master data management api
This commit is contained in:
+8
-7
@@ -29,6 +29,7 @@ func main() {
|
||||
feat := os.Args[1]
|
||||
parts := strings.Split(feat, "/")
|
||||
entity := parts[len(parts)-1]
|
||||
pluralEntityKebab := toPlural(toKebab(entity))
|
||||
|
||||
d := Data{
|
||||
FeatName: feat,
|
||||
@@ -52,43 +53,43 @@ func main() {
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/validation.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s", "validations"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab, "validations"),
|
||||
OutSuffix: ".validation.go",
|
||||
TplName: "validation",
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/service.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s", "services"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab, "services"),
|
||||
OutSuffix: ".service.go",
|
||||
TplName: "service",
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/controller.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s", "controllers"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab, "controllers"),
|
||||
OutSuffix: ".controller.go",
|
||||
TplName: "controller",
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/repository.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s", "repositories"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab, "repositories"),
|
||||
OutSuffix: ".repository.go",
|
||||
TplName: "repository",
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/dto.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s", "dto"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab, "dto"),
|
||||
OutSuffix: ".dto.go",
|
||||
TplName: "dto",
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/route.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab),
|
||||
OutSuffix: "",
|
||||
TplName: "route",
|
||||
},
|
||||
{
|
||||
TplPath: "tools/templates/module.tmpl",
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), toKebab(d.Entity)+"s"),
|
||||
OutDir: filepath.Join("internal", "modules", toKebabPath(d.Parts[:len(d.Parts)-1]), pluralEntityKebab),
|
||||
OutSuffix: "",
|
||||
TplName: "module",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user