...
|
...
|
@@ -108,18 +108,6 @@ func FieldsToColumnSchemas(fields []*domain.Field) []domain.ColumnSchema { |
|
|
return result
|
|
|
}
|
|
|
|
|
|
func DomainFieldsToColumnSchemas(fields []*domain.Field) []domain.ColumnSchema {
|
|
|
result := make([]domain.ColumnSchema, 0)
|
|
|
|
|
|
for _, f := range fields {
|
|
|
result = append(result, domain.ColumnSchema{
|
|
|
ColumnName: f.Name,
|
|
|
ColumnType: f.SQLType, // domain.String.ToString(),
|
|
|
})
|
|
|
}
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
func ToDataLoadDataTable(data DataCheckoutTables) *domain.DataLoadDataTable {
|
|
|
response := &domain.DataLoadDataTable{
|
|
|
PageNumber: data.PageNumber,
|
...
|
...
|
@@ -181,28 +169,6 @@ func NewRequestCheckoutTablesGenerateMasterTable(param domain.ReqGenerateTable) |
|
|
return request
|
|
|
}
|
|
|
|
|
|
func ToFieldSchemas(fields []*domain.Field) []FieldSchema {
|
|
|
result := make([]FieldSchema, 0)
|
|
|
for _, f := range fields {
|
|
|
result = append(result, FieldSchema{
|
|
|
FieldZhName: f.Name,
|
|
|
FieldEnName: f.SQLName,
|
|
|
FieldType: f.SQLType,
|
|
|
FieldDescription: f.Description,
|
|
|
IsAllowNull: true,
|
|
|
})
|
|
|
}
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
func ToFieldSchemaEnNames(fields []*domain.Field) []string {
|
|
|
result := make([]string, 0)
|
|
|
for _, f := range fields {
|
|
|
result = append(result, f.SQLName)
|
|
|
}
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
type (
|
|
|
TableAppendRequest struct {
|
|
|
//MasterTableId string `json:"masterTableId"`
|
...
|
...
|
@@ -243,10 +209,6 @@ func NewTableAppendRequest(param domain.ReqAppendData) TableAppendRequest { |
|
|
req.SchemaMap[param.To[i].SQLName] = columnSchemas[i]
|
|
|
}
|
|
|
}
|
|
|
//if len(param.From) > 0 {
|
|
|
// req.ColumnSchemas = DomainFieldsToColumnSchemas(param.From)
|
|
|
// req.FieldSchemas = ToFieldSchemas(param.To)
|
|
|
//}
|
|
|
return req
|
|
|
}
|
|
|
|
...
|
...
|
|