'yspay_account', # 显示给用户看的名称 'lang' => '银联账户信息', 'order' => -200, 'menu' => false, # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'update' => 'hidden', //'list' => true, ), 'shop_id' => array ( 'type' => 'int-11', 'name' => '门店名称', 'default' => '', 'desc' => '所属门店', 'match' => 'is_numeric', 'update' => 'text', 'search' => array ( 'api' => 'shop/info-like', 'col' => 'name', 'result' => 'id', ), 'list' => 'Dever::load("shop/info-one#name", {shop_id})', ), 'mid' => array ( 'type' => 'varchar-50', 'name' => '分账商户号', 'default' => '', 'desc' => '分账商户号', 'match' => 'option', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'cash' => array ( 'type' => 'int-11', 'name' => '余额', 'default' => '0', 'desc' => '余额', 'match' => 'option', 'update' => 'text', 'list' => 'round({cash}/100, 2)', ), 'tx_cash' => array ( 'type' => 'int-11', 'name' => '提现总金额', 'default' => '0', 'desc' => '提现总金额', 'match' => 'option', 'update' => 'text', 'list' => 'round({tx_cash}/100, 2)', ), 'sdate' => array ( 'type' => 'int-11', 'name' => '更新时间', 'default' => '', 'match' => 'is_numeric', 'desc' => '', 'search' => 'date', 'list' => '"{sdate}" ? date("Y-m-d H:i", \'{sdate}\') : "-"', 'order' => 'desc', ), '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 ( 'edit' => false, 'insert' => false, 'delete' => false, ), 'request' => array ( 'tx_inc' => array ( 'type' => 'update', 'where' => array ( 'id' => 'yes', ), 'set' => array ( 'tx_cash' => array('yes', '+='), ), ), 'dec' => array ( 'type' => 'update', 'where' => array ( 'id' => 'yes', ), 'set' => array ( 'cash' => array('yes', '-='), ), ), ), );