mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 20:20:34 +07:00
feat: new parser & generator
This commit is contained in:
27
model/model.go
Normal file
27
model/model.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user