| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 | <?php$status = array(    1 => '待核销',    2 => '已核销',    3 => '已作废',);$act_status = array(    1 => '未开始',    2 => '报名中',    3 => '报名结束',    4 => '活动开始',    5 => '活动结束',);return array(    # 表名    'name' => 'code',    # 显示给用户看的名称    'lang' => '活动核销码',    # 后台菜单排序    'order' => 2,    // 'menu' => false,    # 数据结构    'struct' => array    (        'id'        => array        (            'type'      => 'int-11',            'name'      => 'ID',            'default'   => '',            'desc'      => '',            'match'     => 'is_numeric',            'search'    => 'order',            'list'      => true,            'order'     => 'desc',        ),        'active_id'      => array        (            'type'      => 'int-11',            'name'      => '活动名称',            'default'   => '-1',            'desc'      => '活动名称',            'match'     => 'is_string',            'update'    => 'hidden',            // 'search'    => 'text',            'list'      => "Dever::load('active/lib/manage.active#active_name',{active_id})",        ),        'order_id'      => array        (            'type'      => 'int-11',            'name'      => '订单名称',            'default'   => '-1',            'desc'      => '订单名称',            'match'     => 'is_string',            'update'    => 'hidden',            // 'search'    => 'text',            // 'list'      => true,        ),        'join_uid'      => array        (            'type'      => 'int-11',            'name'      => '参加人名称/手机号',            'default'   => '-1',            'desc'      => '用户名称',            'match'     => 'is_string',            // 'option'    => $user,            // 'update'    => 'text',            'search'    => array            (                'api' => 'active/user-getSearch',                'col' => 'col',                'result' => 'id',                'search' => 'mid',            ),            'list_name' => '参加人信息',            'list'      => "Dever::load('active/lib/manage.user',{join_uid})",        ),        'buy_uid'      => array        (            'type'      => 'int-11',            'name'      => '购买人姓名/手机号',            'default'   => '-1',            'desc'      => '用户名称',            'match'     => 'is_string',            // 'option'    => $user,            // 'update'    => 'text',            'search'    => array            (                'api' => 'active/user-getSearch',                'col' => 'col',                'result' => 'id',                'search' => 'mid',            ),            'list_name' => '购买人信息',            'list'      => "Dever::load('active/lib/manage.user',{buy_uid})",        ),        'write_code'      => array        (            'type'      => 'varchar-200',            'name'      => '核销码',            'default'   => '',            'desc'      => '核销码',            'match'     => 'is_string',            'update'    => 'text',            'search'    => 'fulltext',            'list'      => true,        ),        'act_status'        => array        (            'type'      => 'tinyint-1',            'name'      => '活动状态',            'default'   => '1',            'desc'      => '活动状态',            'match'     => 'is_numeric',            // 'update'    => 'radio',            'option'    => $act_status,            'search'    => 'select',            'list'      => true,        ),        'status'        => array        (            'type'      => 'tinyint-1',            'name'      => '核销状态',            'default'   => '1',            'desc'      => '核销状态',            'match'     => 'is_numeric',            'option'    => $status,            'search'    => 'select',            'list'      => true,        ),        'pic'       => array        (            'type'      => 'text-255',            'name'      => '二维码',            'default'   => '',            'desc'      => '二维码',            'match'     => 'option',            'update'    => 'image',            'key'       => '1',            // 'place'     => '759*562',        ),        'offdate'     => array        (            'type'      => 'int-11',            'name'      => '核销时间',            'default'   => '',            'match'     => 'is_numeric',            // 'search'    => 'date',            // 'desc'      => '',            // 'list'      => 'date("Y-m-d H:i:s", {zdate})',        ),        'audit_admin'     => array        (            'type'      => 'int-11',            'name'      => '核销操作人',            'default'   => '',            'match'     => 'is_numeric',            'desc'      => '核销操作人',            'list'      => 'Dever::load("active/lib/manage.active#admin_name",{id})',            // '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',            // 'list_order'  => 8,        ),        'top_admin'     => array        (            'type'      => 'int-11',            'name'      => '前台核销操作人',            'default'   => '',            'match'     => 'is_numeric',            'desc'      => '核销操作人',            // 'list'      => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',            // 'list_order'  => 8,        ),        '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'    => 'day',            'list'      => 'date("Y-m-d H:i:s", {cdate})',            'list_order' => 5,        ),    ),    'manage' => array    (    	'insert' => false,        'delete' => false,        'edit' => false,            ),    'request' => array    (        'getAll' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'join_uid' => 'yes',                'state' => 1,            ),            'type' => 'all',            'order' => array('cdate' => 'desc'),            'col' => '*',        ),        'getCode' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'order_id' => 'yes',                'status' => array('yes','in'),                'state' => 1,            ),            'type' => 'all',            'order' => array('cdate' => 'desc'),            'col' => '*',        ),    ),);
 |