Files
gormlint/common/model.go
GogaCoder 49878c333c feat: references check
... and fixes: parse fields without tags and other logical errors
2024-12-30 21:15:15 +07:00

24 lines
426 B
Go

package common
import (
"go/ast"
"go/token"
)
type Field struct {
Name string
Type ast.Expr
Tags *string
Options []string // contains options like "autoCreateTime" or "null"
Params []string // contains params like "foreignKey:CustomerId" or "constrain:OnDelete:Cascade"
Pos token.Pos
Comment string
}
type Model struct {
Name string
Fields map[string]Field
Pos token.Pos
Comment string
}