| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 | <?php$type = array(	//1 => '街道',	2 => '创客直推佣金',	//3 => '九阳自动炒菜机套餐',);$level = function(){    $info = Dever::db('area/level')->select();    return $info;};return array(    # 表名    'name' => 'prize',    # 显示给用户看的名称    'lang' => '名额配置',    # 后台菜单排序    'order' => 1,    # 数据结构    'struct' => array    (        'id'        => array        (            'type'      => 'int-11',            'name'      => 'ID',            'default'   => '',            'desc'      => '',            'match'     => 'is_numeric',            'search'    => 'order',            'list'      => true,            'order'     => 'desc',        ),                'name'      => array        (            'type'      => 'varchar-200',            'name'      => '名称',            'default'   => '',            'desc'      => '名称',            'match'     => 'is_string',            'update'    => 'text',            'search'    => 'fulltext',            'list'      => true,        ),        'desc'      => array        (            'type'      => 'varchar-500',            'name'      => '描述',            'default'   => '',            'desc'      => '描述',            'match'     => 'option',            'update'    => 'textarea',            //'search'    => 'fulltext',            //'list'      => true,        ),        'type'        => array        (            'type'      => 'tinyint-1',            'name'      => '名额类型',            'default'   => '1',            'desc'      => '名额类型',            'match'     => 'is_numeric',            'update'  	=> 'radio',            'option'    => $type,            'search'    => 'select',            'list'      => true,            'control'	=> 'type',        ),        'level'        => array        (            'type'      => 'int-11',            'name'      => '城市等级',            'default'   => '-1',            'desc'      => '城市等级',            'match'     => 'is_numeric',            //'update'  	=> 'radio',            'option'    => $level,            'show'		=> 'type=1',        ),        'price'      => array        (            'type'      => 'varchar-11',            'name'      => '价值-以元为单位,如输入40000,就是4万元,选择街道时,代表赠送价值4万元的街道',//,如果为空,则按照选择的城市等级赠送            'default'   => '0',            'desc'      => '价值',            'match'     => 'option',            'update'    => 'text',            'list'      => true,        ),        'per'      => array        (            'type'      => 'varchar-11',            'name'      => '百分比数值-输入60代表60%,选择创客时,代表推荐创客可以获得60%的佣金',            'default'   => '0',            'desc'      => '价值',            'match'     => 'option',            'update'    => 'text',            'show'      => 'type=2',        ),        'num'      => array        (            'type'      => 'int-11',            'name'      => '默认数量',            'default'   => '1',            'desc'      => '数量',            'match'     => 'is_numeric',            'update'    => 'text',            '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    (    	    ),    'request' => array    (        'getInfo' => array        (            # 匹配的正则或函数 选填项            'option' => array            (                'type' => array('yes', 'in'),                'state' => 1,            ),            'type' => 'all',            'col' => '*',        ),    ),);
 |