feat: new parser & generator

This commit is contained in:
2025-03-09 13:12:12 +07:00
parent 70fc3345d8
commit a3283b9a57
25 changed files with 372 additions and 301 deletions

27
model/model.go Normal file
View File

@@ -0,0 +1,27 @@
package model
import "go/ast"
type Model struct {
Name string
Fields []Field
}
type Field struct {
Name string
Type ast.Expr
Tag string
Metadata FieldMetadata
}
type FieldMetadata struct {
Hidden bool
Readonly bool
Label string
IsSlice bool
IsPrimitiveType bool
IsRelatedModel bool
RelatedModel string
Datatype string
RelatedFields []string
}