upd(crm): update module api fields parameter

This commit is contained in:
Tit Petric
2018-12-04 16:40:02 +01:00
parent c7d4b4d629
commit 99f8f4e872
8 changed files with 61 additions and 235 deletions
+5 -89
View File
@@ -6,29 +6,7 @@
"entrypoint": "field",
"path": "/field",
"authentication": [],
"struct": [
{
"name": "Field",
"fields": [
{
"name": "Name",
"type": "string",
"db": "field_name"
},
{
"name": "Type",
"type": "string",
"db": "field_type"
},
{
"name": "Template",
"type": "string",
"db": "field_template",
"omitempty": true
}
]
}
],
"struct": [],
"apis": [
{
"name": "list",
@@ -259,71 +237,9 @@
"authentication": [],
"struct": [
{
"name": "Module",
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types"
],
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
},
{
"name": "Fields",
"type": "sqlxTypes.JSONText",
"json": "fields",
"db": "json"
}
]
},
{
"name": "ModuleField",
"fields": [
{
"name": "Name",
"type": "string"
},
{
"name": "Title",
"type": "string"
},
{
"name": "Kind",
"type": "string"
},
{
"name": "GDPR",
"type": "bool"
},
{
"name": "Show",
"type": "bool"
}
]
},
{
"name": "Content",
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types"
],
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "moduleID",
"type": "uint64"
},
{
"name": "Fields",
"type": "sqlxTypes.JSONText",
"db": "json"
}
"sqlxTypes github.com/jmoiron/sqlx/types",
"github.com/crusttech/crust/crm/types"
]
}
],
@@ -358,7 +274,7 @@
"title": "Module Name"
},
{
"type": "sqlxTypes.JSONText",
"type": "types.ModuleFieldSet",
"name": "fields",
"required": true,
"title": "Fields JSON"
@@ -482,7 +398,7 @@
"title": "Module Name"
},
{
"type": "sqlxTypes.JSONText",
"type": "types.ModuleFieldSet",
"name": "fields",
"required": true,
"title": "Fields JSON"
+1 -23
View File
@@ -3,29 +3,7 @@
"Description": "CRM input field definitions",
"Package": "crm",
"Interface": "Field",
"Struct": [
{
"fields": [
{
"db": "field_name",
"name": "Name",
"type": "string"
},
{
"db": "field_type",
"name": "Type",
"type": "string"
},
{
"db": "field_template",
"name": "Template",
"omitempty": true,
"type": "string"
}
],
"name": "Field"
}
],
"Struct": [],
"Parameters": null,
"Protocol": "",
"Authentication": [],
+5 -67
View File
@@ -5,72 +5,10 @@
"Interface": "Module",
"Struct": [
{
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
},
{
"db": "json",
"json": "fields",
"name": "Fields",
"type": "sqlxTypes.JSONText"
}
],
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types"
],
"name": "Module"
},
{
"fields": [
{
"name": "Name",
"type": "string"
},
{
"name": "Title",
"type": "string"
},
{
"name": "Kind",
"type": "string"
},
{
"name": "GDPR",
"type": "bool"
},
{
"name": "Show",
"type": "bool"
}
],
"name": "ModuleField"
},
{
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "moduleID",
"type": "uint64"
},
{
"db": "json",
"name": "Fields",
"type": "sqlxTypes.JSONText"
}
],
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types"
],
"name": "Content"
"sqlxTypes github.com/jmoiron/sqlx/types",
"github.com/crusttech/crust/crm/types"
]
}
],
"Parameters": null,
@@ -111,7 +49,7 @@
"name": "fields",
"required": true,
"title": "Fields JSON",
"type": "sqlxTypes.JSONText"
"type": "types.ModuleFieldSet"
}
]
}
@@ -235,7 +173,7 @@
"name": "fields",
"required": true,
"title": "Fields JSON",
"type": "sqlxTypes.JSONText"
"type": "types.ModuleFieldSet"
}
]
}