25 lines
466 B
Go
25 lines
466 B
Go
|
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"`
|
||
|
}
|