mirror of
https://github.com/cubixle/tuugen.git
synced 2026-04-30 12:18:42 +01:00
started work on the data models
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"embed"
|
"embed"
|
||||||
_ "embed"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
|||||||
@@ -10,3 +10,14 @@ type DataProperty struct {
|
|||||||
Type string `yaml:"type"`
|
Type string `yaml:"type"`
|
||||||
AutoIncrement bool `yaml:"autoinc"`
|
AutoIncrement bool `yaml:"autoinc"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GenerateDataModels(cfg Config) error {
|
||||||
|
t, err := template.ParseFS(FS, "templates/data_model.go.tmpl")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
outputFile := "internal/data/models.go"
|
||||||
|
// check/create file path
|
||||||
|
fp := filepath.Dir(outputFile)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user