| 114 | } |
| 115 | |
| 116 | func getPrimaryKeyInfo(info *CrudInfo) *PrimaryKey { |
| 117 | if info == nil { |
| 118 | return nil |
| 119 | } |
| 120 | return &PrimaryKey{ |
| 121 | Name: info.ColumnName, |
| 122 | NameCamel: info.ColumnNameCamel, |
| 123 | NameCamelFCL: info.ColumnNameCamelFCL, |
| 124 | NamePluralCamel: info.ColumnNamePluralCamel, |
| 125 | NamePluralCamelFCL: info.ColumnNamePluralCamelFCL, |
| 126 | GoType: info.GoType, |
| 127 | GoTypeFCU: info.GoTypeFCU, |
| 128 | IsStringType: info.IsStringType, |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | // UnMarshalTableInfo unmarshal the json data to TableInfo struct |
| 133 | func UnMarshalTableInfo(data string) (map[string]interface{}, error) { |