123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <?php
- $type = array
- (
- 1 => '主积分',
- 2 => '普通积分',
- 3 => '可自定义积分',
- );
- $callback_type = array
- (
- 1 => '无回调',
- 2 => 'Dever组件',
- 3 => 'http接口',
- 4 => '命令行',
- );
- return array
- (
- # 表名
- 'name' => 'config',
- # 显示给用户看的名称
- 'lang' => '积分名称设置',
- 'order' => 1,
- 'end' => array
- (
- 'insert' => 'score/lib/manage.config',
- 'update' => 'score/lib/manage.config',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- ),
-
- 'name' => array
- (
- 'type' => 'varchar-32',
- 'name' => '积分名称',
- 'default' => '',
- 'desc' => '请输入积分名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '是否主积分-只能有一个主积分,主积分将作为用户主要积分显示在用户信息中',
- 'default' => '2',
- 'desc' => '是否主积分',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $type,
- 'search' => 'select',
- 'list' => true,
- ),
- 'callback_type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '回调类型',
- 'default' => '1',
- 'desc' => '回调类型',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $callback_type,
- 'search' => 'select',
- 'control' => 'callback_type',
- ),
- 'callback_value' => array
- (
- 'type' => 'varchar-800',
- 'name' => '回调地址-积分增减成功后,将自动调取回调,会把user_log表的数据传过去,如果代码中设置了回调,该回调将失效',
- 'default' => '',
- 'desc' => '回调地址',
- 'match' => 'is_string',
- 'update' => 'textarea',
- 'show' => 'callback_type=2,3,4',
- ),
-
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序(数值越大越靠前)',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- 'update' => 'text',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => 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,
- ),
- ),
- 'manage' => array
- (
- # 列表
- 'list_button' => array
- (
- 'list' => array('规则设置', '"rule&search_option_config_id={id}&oper_parent=config"'),
- 'list1' => array('自定义积分列表', '"config_child&search_option_config_id={id}&oper_parent=config"', '{type} == 3'),
- ),
- ),
- 'request' => array
- (
- # 更新
- 'set' => array
- (
- 'type' => 'update',
- 'set' => array
- (
- 'type' => '2',
- ),
- ),
- ),
-
- );
|