<?php

$mid = Dever::input('search_option_mid');

$status = array
(
	1 => '发放成功',
	2 => '发放失败',
);
return array
(
    # 表名
    'name' => 'push_cash',
    # 显示给用户看的名称
    'lang' => '发放资金',
    'order' => 99,
    'menu' => false,
    'end' => array
    (
        'insert' => 'bill/lib/manage.cashUpdate',
    ),
    # 数据结构
    'struct' => array
    (
    
        'id'        => array
        (
            'type'      => 'int-11',
            'name'      => 'ID',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            'search'    => 'order',
            //'list'        => true,
        ),

        'mid'      => array
        (
            'type'      => 'int-11',
            'name'      => '代理商',
            'default'   => '-1',
            'desc'      => '代理商',
            'match'     => 'is_string',
            'update'    => 'hidden',
            'value'		=> $mid,
        ),

        'cash'      => array
        (
            'type'      => 'decimal-11,2',
            'name'      => '发放金额-金额单位为元',
            'default'   => '',
            'desc'      => '发放金额',
            'match'     => 'is_numeric',
            'update'    => 'text',
        ),

        'desc'      => array
        (
            'type'      => 'varchar-600',
            'name'      => '资金说明',
            'default'   => '',
            'desc'      => '资金说明',
            'match'     => 'option',
            'update'    => 'textarea',
        ),

        'admin_founder' => array
        (
            'type'      => 'int-11',
            'name'      => '插入操作人',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            'search'    => 'order',
            //'list'        => true,
        ),

        'admin_editor' => array
        (
            'type'      => 'int-11',
            'name'      => '更新操作人',
            'default'   => '',
            'desc'      => '',
            'match'     => 'is_numeric',
            'search'    => 'order',
            //'list'        => true,
        ),

        'status'        => array
        (
            'type'      => 'int-11',
            'name'      => '发放状态',
            'default'   => '1',
            'desc'      => '发放状态',
            'match'     => 'is_numeric',
            'update'  	=> 'hidden',
            'option'    => $status,
        ),

        '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", {cdate})',
            'list_order'  => 2,
        ),
    ),

    'manage' => array
    (
        'insert' => false,
        'delete' => false,
        'edit' => false,
        'page_list' => 'push_cash',

        'list_button' => array
        (
            
        ),
    ),

    'request' => array
    (
        
    ),
);