<?php
return array
(
    'list' => array
    (
        'field'      => array
        (
            'name',
            'level',
            'day_desc',
            
            'price',
            'pay',
            'status' => array
            (
                'type' => 'switch',
                'show'  => '{status}',
                'active_value' => 1,
                'inactive_value' => 2,
            ),
        ),
        'button' => array
        (
            '新增' => array('add'),
        ),
        'data_button' => array
        (
            '编辑' => 'edit',
        ),
        'search'    => array
        (
            'name',
        ),
    ),
    'update' => array
    (
        'tab' => array
        (
            '基本信息' => 'name,level,price,pay,day_desc,day,content',
            '权益设置' => 'place/vip_price',
        ),
        'field'    => array
        (
            'name' => array
            (
                'rules' => true,
            ),
            'level' => array
            (
                'rules' => true,
                'desc' => '将按照等级数字正序排序',
            ),
            'price' => array
            (
                'rules' => true,
            ),
            'pay' => array
            (
                'type' => 'radio',
                'rules' => true,
                'tips' => '差额支付：如用户已是等级1的会员，购买等级2时会自动减去等级1已支付的金额<br />全额支付：根据会员价格全额支付',
            ),
            'day_desc' => array
            (
                'rules' => true,
                'desc' => '设置会员时长名称，如一年',
            ),
            'day' => array
            (
                'rules' => true,
                'desc' => '设置会员时长天数，如365，如果填写-1就是该会员永久有效',
            ),
            'content' => array
            (
                /*
                'type' => 'editor',
                'editorMenu' => array
                (
                    'uploadImage' => 1,
                    'uploadVideo' => 3,
                ),
                */
                'type' => 'textarea',
                //'rows' => 4,
                'autosize' => array('minRows' => 4),
            ),

            'place/vip_price' => array
            (
                'name' => '默认折扣',
                'where'  => array('vip_id' => 'id'),
                'desc' => '设置购买资源的默认折扣，如果资源里单独设置了“会员价格/折扣”，此处设置将失效',
                'default' => Dever::load('manage', 'place')->getResourceDefault(array('per' => '')),
            ),
        ),
    ),
);