server/pkg/loafer/data/column.go

25 lines
466 B
Go
Raw Normal View History

2019-11-19 14:58:46 +00:00
package data
import (
"reflect"
"git.loafle.net/loafer/annotation-go"
)
var ColumnAnnotationType = reflect.TypeOf((*ColumnAnnotation)(nil))
func init() {
if err := annotation.Register(ColumnAnnotationType); nil != err {
panic(err)
}
}
type ColumnAnnotation struct {
annotation.TypeAnnotation `@annotation:"@data:Column"`
Type string `json:"type"`
Name string `json:"name"`
Length uint16 `json:"length"`
Nullable bool `json:"nullable"`
}