interface.md 2.8 KB

接口数据库设计

接口表

'title' => '接口标题', 'en_alias' => '接口的英文别名', // 英文别名 'website_id' => '', // 站点id 'status' => 1, // 开启使用 0 禁用,禁用后,系统内部还是可以使用的 'is_login' => '', // 是否需要登录

条件关联表

parent_id 允许多级嵌套 level

'interface_id' => '',

'assemble_id' => '', // 集合id

'column_id' => '',

'type' => '', // 接口类型 1查询 2添加 3修改 4删除 /**

  • 查询类型 1 单条信息查询 2 分页列表查询 3 列表查询 4 树形列表查询 (对象) 5 条件总数 6 字段总和 7字段平均值 8 字段最大值 9 字段最小值 */ 'search_type' => '', 'filed' => '', // 字段 // 查询设置 'request_setting' => [ [ 'type' => 1, // 1 基础字段 2 绑定token 3 默认值 'column_id' => '', 'value' => '', // 允许为字符串和数组 'rules' => [ // 验证规则 ['type' => 1,], // 系统规则 ['type' => 2,] // 自定义规则 ], 'es_search' => [ 'filed' => [], // 有的允许一个字符串,有的允许两个字符串 'operate' => '=', // term terms match 'params' => '{json}', // 扩展参数 ] ], // [ 'type' => 2, // 1 基础字段 2 绑定token 3 默认值 'column_id' => '', 'flag_id' => 1, // 标识符 'flag_column' => '', // 标识符对应的字段 'es_search' => [ 'filed' => [], // 有的允许一个字符串,有的允许两个字符串 'operate' => '=', // term terms match 'params' => '{json}', // 扩展参数 ] ], // [ 'type' => 3, //该值不受传入数据的影响 1 基础字段 2 绑定token 3 默认值 'column_id' => '', 'value' => '', // 允许为字符串和数组 'es_search' => [ 'filed' => [], // 有的允许一个字符串,有的允许两个字符串 'operate' => '=', // term terms match 'params' => '{json}', // 扩展参数 ] ], ],

// 排序设置 'sort' => [

[
    'column_id' => '',
    'direction' =>'0,1,2' // 0 全部 1 asc 2 desc
]

],

####################################################

结果集返回

id parent_id 允许多级嵌套 'interface_id' => '',

‘yes_result’ => 0 什么都不返回 1 返回 message 2 返回上层结果 3 返回下级结果 'yes_function_type' => '1' // 1 系统函数 2 功能id 'yes_function' => 'interface_id', 'yes_interface' => 'interface_id',

‘no_result’ => 0 什么都不返回 1 返回 message 2 返回上层结果 3 返回下级结果 'no_function_type' => '1' // 1 系统函数 2 功能id 'no_function' => 'interface_id', 'no_interface' => 'interface_id',