<?php

return array
(
    # 表名
    'name' => 'add_card',
    # 显示给用户看的名称
    'lang' => '新增兑换码',
    'order' => 1,
    'menu' => false,
    'end' => array
    (
        'update' => 'goods/lib/manage.createCard',
        'insert' => 'goods/lib/manage.createCard',
    ),
    # 数据结构
    'struct' => array
    (
        'id'        => array
        (
            'type'      => 'int-11',
            'name'      => '系统ID',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            'value'     => Dever::input('where_id'),
        ),

        'card_id'        => array
        (
            'type'      => 'int-11',
            'name'      => '商品卡',
            'default'   => '',
            'desc'      => '商品卡',
            'match'     => 'is_numeric',
            'update'    => 'hidden',
            'value'     => Dever::input('search_option_card_id'),
            'list'      => 'Dever::load("goods/card-find#name", "{card_id}")',
        ),
        
        'num'       => array
        (
            'type'      => 'varchar-32',
            'name'      => '兑换码数量',
            'default'   => '',
            'desc'      => '请输入兑换码数量',
            'match'     => 'is_string',
            'update'    => 'text',
            'value'     => '',
        ),

        'cdate'     => array
        (
            'type'      => 'int-11',
            'name'      => '录入时间',
            'match'     => array('is_numeric', time()),
            'desc'      => '',
            # 只有insert时才生效
            'insert'    => true,
        ),
    ),

    'manage' => array
    (
        # 后台管理不要列表页
        'list' => 'update',
    ),
);
