123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <?php
- $type = array
- (
- 1 => '门票榜单',
- 2 => '购物榜单',
- 3 => '邀请榜单',
- 4 => '积分榜单',
- //5 => '赞赏榜单',
- //6 => '贡献榜单',
- //7 => '成员榜单',
- 10 => '投票榜单',
- );
- $periods = array
- (
- //1 => '天',
- 2 => '周',
- 3 => '月',
- 4 => '年',
- 5 => '永久',
- );
- $status = array
- (
- 1 => '开启',
- 2 => '关闭',
- );
- return array
- (
- # 表名
- 'name' => 'ranking',
- # 显示给用户看的名称
- 'lang' => '榜单设置',
- 'menu' => false,
- 'check' => 'info_id,type',
- 'ends' => array
- (
- 'insert' => 'collection/lib/manage.setRankingCache',
- 'update' => 'collection/lib/manage.setRankingCache',
- ),
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'update' => 'hidden',
- //'list' => true,
- ),
- 'info_id' => array
- (
- 'type' => 'int-11',
- 'name' => '合集',
- 'default' => '',
- 'desc' => '合集',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'value' => Dever::input('search_option_info_id')
- ),
- 'name' => array
- (
- 'type' => 'varchar-80',
- 'name' => '榜单标题',
- 'default' => '',
- 'desc' => '榜单标题',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'status' => array
- (
- 'type' => 'int-11',
- 'name' => '榜单状态',
- 'default' => '2',
- 'desc' => '榜单状态',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $status,
- 'list' => true,
- 'edit' => true,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '榜单类型',
- 'default' => '1',
- 'desc' => '榜单类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $type,
- 'list' => true,
- ),
- 'start' => array
- (
- 'type' => 'int-11',
- 'default' => '',
- 'name' => '总榜开始时间',
- 'match' => 'option',
- 'desc' => '总榜开始时间',
- 'update' => 'date',
- //'list' => 'date("Y-m-d H:i:s", {start})',
- 'callback' => 'maketime',
- ),
- 'end' => array
- (
- 'type' => 'int-11',
- 'default' => '',
- 'name' => '总榜结束时间',
- 'match' => 'option',
- 'desc' => '总榜结束时间',
- 'update' => 'date',
- //'list' => 'date("Y-m-d H:i:s", {end})',
- 'callback' => 'maketime',
- ),
- 'periods' => array
- (
- 'type' => 'int-11',
- 'name' => '榜单周期-到周期之后自动生成的一期榜单',
- 'default' => '1',
- 'desc' => '榜单周期',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $periods,
- 'list' => true,
- ),
- 'desc' => array
- (
- 'type' => 'text-255',
- 'name' => '榜单描述',
- 'default' => '',
- 'desc' => '榜单描述',
- 'match' => 'option',
- 'update' => 'editor',
- 'key' => 1,
- //'search' => 'fulltext',
- //'list' => true,
- ),
- '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,
- 'search' => 'date',
- //'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- 'manage' => array
- (
- //'delete' => false,
- # 列表
- 'list_button' => array
- (
- 'list1' => array('榜单期数', '"ranking_periods&search_option_info_id={info_id}&search_option_ranking_id={id}&top_table=ranking_data&oper_table=ranking&top_table=info"'),
- 'list' => array('榜单数据', '"ranking_data&search_option_info_id={info_id}&search_option_ranking_id={id}&top_table=ranking_data&oper_table=ranking&top_table=info"', '{type} < 10'),
- 'list2' => array('投票设置', '"ranking_vote&search_option_info_id={info_id}&search_option_ranking_id={id}&top_table=ranking_vote&oper_table=ranking&top_table=info"', '{type} == 10'),
- ),
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'info_id' => 'yes',
- 'type' => 'yes',
- 'state' => 1,
- 'status' => 1,
- ),
- 'type' => 'all',
- 'order' => array('reorder' => 'desc', 'id' => 'desc'),
- 'col' => '*',
- ),
- 'getOne' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'info_id' => 'yes',
- 'type' => 'yes',
- 'state' => 1,
- 'status' => 1,
- ),
- 'type' => 'one',
- 'col' => '*',
- ),
- ),
- );
|