123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?php
- $type = array
- (
- 'text' => '文本框',
- 'textarea' => '大文本框',
- 'editor' => '编辑器',
- 'image' => '图片',
- );
- $source = array
- (
- 1 => '自建数据库',
- 2 => '网络API',
- 3 => '数据采集系统[未开通]',
- );
- return array
- (
- # 表名
- 'name' => 'col',
- # 显示给用户看的名称
- 'lang' => '字段管理',
- 'order' => 20,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'fulltext',
- 'order' => 'desc',
- 'list' => true,
- ),
- 'name' => array
- (
- 'type' => 'varchar-60',
- 'name' => '字段名称',
- 'default' => '',
- 'desc' => '请填写字段名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' => true,
- ),
- 'source' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '数据来源',
- 'default' => '',
- 'desc' => '数据来源',
- 'match' => 'is_numeric',
- 'option' => $source,
- 'update' => 'select',
- 'search' => 'select',
- 'list' => true,
- 'show' => 'source',
- ),
- 'type' => array
- (
- 'type' => 'varchar-60',
- 'name' => '字段类型',
- 'default' => '',
- 'desc' => '字段类型',
- 'match' => 'is_string',
- 'option' => $type,
- 'update' => 'select',
- 'search' => 'select',
- 'list' => true,
- ),
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- ),
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '录入时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
-
- 'manage' => array
- (
- 'list_button' => array
- (
- 'addData' => array('新增数据', '"data&search_option_col_id={id}&oper_parent=col"', '{source}==1'),
- 'listData' => array('数据列表', '"data&search_option_col_id={id}&oper_parent=col"'),
- //'listData' => array('数据列表', '"data&project=content&search_option_col_id={id}&opers_save_jump=company&oper_parent=company&oper_key=service"'),
- ),
- ),
-
- # request 请求接口定义
- 'request' => array
- (
- 'get' => array
- (
- 'where' => array
- (
- 'name' => array('yes', 'in'),
- 'state' => 1,
- ),
- 'type' => 'all',
- ),
- ),
- );
|