<?php

$type = array
(
	1 => '无资金管理功能',
	2 => '有资金管理功能',
);

$cash_type = array
(
	1 => '通过交易金额分账',
	2 => '通过实际金额分账',
);

return array
(
	# 表名
	'name' => 'yspay',
	# 显示给用户看的名称
	'lang' => '银商扩展配置',
	'order' => 10,
	'menu' => false,
	# 数据结构
	'struct' => array
	(
	
		'id' 		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> 'ID',
			'default' 	=> '',
			'desc' 		=> '',
			'match' 	=> 'is_numeric',
			'search'	=> 'order',
			'list'		=> true,
		),

		'account_id'		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> '所属账户',
			'default' 	=> '1',
			'desc' 		=> '所属账户',
			'match' 	=> 'is_numeric',
			'update'	=> 'hidden',
		),

		'per'		=> array
		(
			'type' 		=> 'varchar-11',
			'name' 		=> '银联交易手续费百分比-如输入10,就是从总支付金额中收取10%手续费,这个会自动扣掉,输入0.1就是千分之1',
			'default' 	=> '10',
			'desc' 		=> '银联交易手续费百分比',
			'match' 	=> 'is_numeric',
			'update'	=> 'text',
		),

		'cash_jy_per'		=> array
		(
			'type' 		=> 'varchar-11',
			'name' 		=> '平台交易手续费百分比-如输入10,就是从总支付金额中收取10%手续费,这个会自动扣掉,输入0.1就是千分之1',
			'default' 	=> '',
			'desc' 		=> '平台交易手续费百分比',
			'match' 	=> 'is_numeric',
			'update'	=> 'text',
		),

		'sign_key'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '自助签约key',
			'default' 	=> '',
			'desc' 		=> '自助签约key',
			'match' 	=> 'is_string',
			'update'	=> 'text',
		),

		'sign_accesser_id'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '自助签约accesser_id',
			'default' 	=> '',
			'desc' 		=> '自助签约accesser_id',
			'match' 	=> 'is_string',
			'update'	=> 'text',
		),

		'tx_sys_id'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '提现系统编号',
			'default' 	=> '',
			'desc' 		=> '提现系统编号',
			'match' 	=> 'is_string',
			'update'	=> 'text',
		),

		'tx_private_key'		=> array
		(
			'type' 		=> 'varchar-2000',
			'name' 		=> '提现私钥',
			'default' 	=> '',
			'desc' 		=> '提现私钥',
			'match' 	=> 'is_string',
			'update'	=> 'textarea',
		),

		'tx_private_key_pkcs1'		=> array
		(
			'type' 		=> 'varchar-2000',
			'name' 		=> '提现PKCS1私钥',
			'default' 	=> '',
			'desc' 		=> '提现PKCS1私钥',
			'match' 	=> 'is_string',
			'update'	=> 'textarea',
		),

		'tx_public_key'		=> array
		(
			'type' 		=> 'varchar-2000',
			'name' 		=> '提现公钥',
			'default' 	=> '',
			'desc' 		=> '提现公钥',
			'match' 	=> 'is_string',
			'update'	=> 'textarea',
		),

		'type'		=> array
		(
			'type' 		=> 'tinyint-1',
			'name' 		=> '资金管理设置',
			'default' 	=> '1',
			'desc' 		=> '支付类型',
			'match' 	=> 'is_string',
			'update'	=> 'radio',
			'option'	=> $type,
			'control'	=> 'type',
		),

		'cash_groupid'		=> array
		(
			'type' 		=> 'varchar-200',
			'name' 		=> '集团号',
			'default' 	=> '',
			'desc' 		=> '集团号',
			'match' 	=> 'is_string',
			'update'	=> 'text',
			'show'		=> 'type=2',
		),

		'cash_per'		=> array
		(
			'type' 		=> 'int-11',
			'name' 		=> '主体分账百分比-如输入10,就是从总支付金额中分账10%',
			'default' 	=> '10',
			'desc' 		=> '主体分账百分比',
			'match' 	=> 'is_numeric',
			//'update'	=> 'text',
			'show'		=> 'type=2',
		),

		'cash_type'		=> array
		(
			'type' 		=> 'tinyint-1',
			'name' 		=> '主体分账类型',
			'default' 	=> '1',
			'desc' 		=> '主体分账类型',
			'match' 	=> 'is_string',
			//'update'	=> 'radio',
			'option'	=> $cash_type,
		),

		'cash_mid'		=> array
		(
			'type' 		=> 'varchar-200',
			'name' 		=> '主体分账商户号',
			'default' 	=> '',
			'desc' 		=> '主体分账商户号',
			'match' 	=> 'is_string',
			//'update'	=> 'text',
			'show'		=> 'type=2',
		),

		'cash_merno'		=> array
		(
			'type' 		=> 'varchar-200',
			'name' 		=> '主体分账企业用户号',
			'default' 	=> '',
			'desc' 		=> '主体分账企业用户号',
			'match' 	=> 'is_string',
			//'update'	=> 'text',
			'show'		=> 'type=2',
		),

		'cash_card'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '主体分账卡号',
			'default' 	=> '',
			'desc' 		=> '主体分账卡号',
			'match' 	=> 'is_string',
			//'update'	=> 'text',
			'show'		=> 'type=2',
		),

		'cash_private_file'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '资金管理私钥文件',
			'default' 	=> '',
			'desc' 		=> '资金管理私钥文件',
			'match' 	=> 'is_string',
			'update'	=> 'upload',
			'key'		=> '4',
			'show'		=> 'type=2',
		),

		'cash_private_file_password'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '资金管理私钥文件密码',
			'default' 	=> '',
			'desc' 		=> '资金管理私钥文件密码',
			'match' 	=> 'is_string',
			'update'	=> 'text',
			'show'		=> 'type=2',
		),

		'cash_public_file'		=> array
		(
			'type' 		=> 'varchar-150',
			'name' 		=> '资金管理公钥文件',
			'default' 	=> '',
			'desc' 		=> '资金管理公钥文件',
			'match' 	=> 'is_string',
			'update'	=> 'upload',
			'key'		=> '4',
			'show'		=> 'type=2',
		),

		'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
	(
		
	),
);