123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <?php
- $status = array
- (
- 1 => '待审核',
- 2 => '审核通过',
- 3 => '审核未通过',
- );
- $score_status = array
- (
- 1 => '未入账',
- 2 => '已入账',
- );
- return array
- (
- # 表名
- 'name' => 'user_report',
- # 显示给用户看的名称
- 'lang' => '用户报告',
- 'menu' => 'passport',
- 'order' => 99,
- 'status' => $status,
- 'score_status' => $score_status,
- 'end' => array
- (
- 'update' => 'task/lib/manage.report_audit',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- //'search' => 'order',
- 'order' => 'desc',
- 'list' => true,
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '用户名',
- 'default' => '',
- 'desc' => '用户名',
- 'match' => 'is_numeric',
- //'update' => 'text',
- 'search' => array
- (
- 'api' => 'passport/user-all',
- 'col' => 'username',
- 'result' => 'id',
- ),
- 'list' => 'Dever::load("passport/user-one#username", {uid})',
- ),
- 'task_id' => array
- (
- 'type' => 'int-11',
- 'name' => '任务名',
- 'default' => '-1',
- 'desc' => '任务名',
- 'match' => 'is_numeric',
- //'update' => 'select',
- 'search' => array
- (
- 'api' => 'task/info-all',
- 'col' => 'name',
- 'result' => 'id',
- ),
- 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
- ),
- 'username' => array
- (
- 'type' => 'varchar-100',
- 'name' => '账号名',
- 'default' => '',
- 'desc' => '账号名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list_name' => '报告信息',
- 'list' => 'Dever::load("task/lib/manage.report", {id})',
- ),
- 'pic' => array
- (
- 'type' => 'text-255',
- 'name' => '任务截屏',
- 'default' => '',
- 'desc' => '任务截屏',
- 'match' => 'is_string',
- 'update' => 'images',
- 'key' => '1',
- 'place' => '150',
- ),
- 'link' => array
- (
- 'type' => 'varchar-100',
- 'name' => '链接',
- 'default' => '',
- 'desc' => '请输入链接',
- 'match' => 'is_string',
- 'update' => 'text',
- //'list' => true,
- ),
- 'desc' => array
- (
- 'type' => 'varchar-800',
- 'name' => '文字说明',
- 'default' => '',
- 'desc' => '文字说明',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '审核状态',
- 'default' => '1',
- 'desc' => '审核状态',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $status,
- 'search' => 'select',
- 'list' => true,
- //'edit' => true,
- ),
- 'status_desc' => array
- (
- 'type' => 'varchar-300',
- 'name' => '审核说明',
- 'default' => '',
- 'desc' => '请输入审核说明',
- 'match' => 'option',
- 'update' => 'textarea',
- ),
- 'score' => array
- (
- 'type' => 'varchar-11',
- 'name' => '积分',
- 'default' => '',
- 'desc' => '积分',
- 'match' => 'is_numeric',
- 'update' => 'text',
- ),
- 'group_score' => array
- (
- 'type' => 'varchar-11',
- 'name' => '下线提成酬劳',
- 'default' => '0',
- 'match' => '下线提成酬劳',
- 'match' => 'is_numeric',
- 'update' => 'text',
- //'list' => true,
- ),
- 'score_status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否入账',
- 'default' => '1',
- 'desc' => '是否入账',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $score_status,
- '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,
- 'search' => 'date',
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
- # 更新表结构
- 'alter' => array
- (
- 1 => array
- (
- array('update', 'score', 'score', 'varchar-11 0 积分'),
- array('update', 'group_score', 'group_score', 'varchar-11 0 下线提成酬劳'),
- ),
- 'version' => 1,
- ),
-
- 'manage' => array
- (
- 'insert' => false,
- 'edit' => false,
- 'delete' => false,
- # page_type = 1
- 'page_list_table' => 'photo',
- 'photo' => 'task/lib/manage.report_photo',
- # 快捷更新
- 'list_button' => array
- (
- 'edit' => array('审核', 'status,status_desc', '{status} == 1'),
- ),
- ),
- 'request' => array
- (
- 'getAll' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'task_id' => 'yes',
- 'uid' => 'yes',
- 'status' => 'yes',
- 'state' => 1,
- ),
- 'type' => 'all',
- 'order' => array('cdate' => 'desc'),
- 'page' => array(15, 'list'),
- 'col' => '*',
- ),
- 'getTotal' => array
- (
- # 匹配的正则或函数 选填项
- 'option' => array
- (
- 'task_id' => 'yes',
- 'uid' => 'yes',
- 'status' => array(3, '!='),
- 'state' => 1,
- ),
- 'type' => 'count',
- ),
- )
- );
|