<?php

return array
(
    # 表名
    'name' => 'discount_goods',
    # 显示给用户看的名称
    'lang' => '折扣商品设置',
    'menu' => false,
    # 数据结构
    'struct' => array
    (
    
        'id'        => array
        (
            'type'      => 'int-11',
            'name'      => 'ID',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            'search'    => 'order',
            'update'    => 'hidden',
            //'list'        => true,
        ),

        'discount_id'        => array
        (
            'type'      => 'int-11',
            'name'      => '折扣',
            'default'   => '',
            'desc'      => '折扣',
            'match'     => 'is_numeric',
            'update'    => 'hidden',
            'search'    => 'hidden',
            'value'     => Dever::input('search_option_discount_id'),
            'list'      => 'Dever::load("act/discount-find#name", "{discount_id}")',
        ),

        'cate_id'      => array
        (
            'type'      => 'int-11',
            'name'      => '商品分类id',
            'default'   => '-1',
            'desc'      => '商品id',
            'match'     => 'is_numeric',
        ),

        'goods_id'      => array
        (
            'type'      => 'int-11',
            'name'      => '商品id',
            'default'   => '-1',
            'desc'      => '商品id',
            'match'     => 'is_numeric',
        ),

        '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})',
        ),
    ),

    'manage' => array
    (
        
    ),

    'request' => array
    (
        'getData' => array
        (
            # 匹配的正则或函数 选填项
            'option' => array
            (
                'discount_id' => 'yes',
                'state' => 1,
            ),
            'order' => array('id' => 'desc'),
            'type' => 'all',
            'col' => '*|goods_id|',
        ),
    ),
);