Browse Source

补充了实体元数据的改动.

pull/12/head
allanwei 4 years ago
parent
commit
35bf2fb77b
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      grmi/Entity.go

+ 3
- 2
grmi/Entity.go View File

@ -5,8 +5,9 @@ type Entity struct {
BuildCursor func() interface{}
Indicator interface{}
FieldMapping map[string]Field
PresetKeys []string
}
func NewEntity(tableName string, buildCursor func() interface{}, fieldMapping map[string]Field) Entity {
return Entity{tableName, buildCursor, buildCursor(), fieldMapping}
func NewEntity(tableName string, buildCursor func() interface{}, fieldMapping map[string]Field, presetKeys []string) Entity {
return Entity{tableName, buildCursor, buildCursor(), fieldMapping, presetKeys}
}

Loading…
Cancel
Save