server/pkg/loafer/data/entity.go

25 lines
468 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 EntityAnnotationType = reflect.TypeOf((*EntityAnnotation)(nil))
func init() {
if err := annotation.Register(EntityAnnotationType); nil != err {
panic(err)
}
}
type EntityAnnotation struct {
annotation.TypeAnnotation `@annotation:"@data:Entity"`
Name string `json:"name"`
Engine string `json:"engine"`
Database string `json:"database"`
Schema string `json:"schema"`
}