<?php
/**
 * 元数据
 */
return [
	'title' => "账户", 
	//主要用于《写操作》
	'table' => "bank", 
	//主要用于《读操作》,数据表格sql,如果没有查询条件在末尾加上  where 1=1
	'view' => "select * from bank where 1=1",
	'order' => "b_id asc", //默认排序
	'key' => "b_id", //主键字段
	'caption' => "b_name", //主要显示字段
	'fields'=>[
		'b_id'=>[
			'field'=>'b_id',
			'name'=>'ID',
			'type'=>'int',
			'key'=>true, //是否为主键
			'unique'=>false, //是否唯一
			'maxlength'=>10, //长度(含有小数)
			'scale'=>0, //小数位数
			'issearch'=>true, //是否参入查询
			'islist'=>true, //是否在列表中显示
			'isview'=>false, //是否在详情视图中显示
			'isorder'=>true, 
			'editor'=> [
				'required'=> true, //是否为必须项
				'type'=> 'hidden', //text,hidden,select,checkbox,radio,textarea
				'fieldtype'=> 'string',//string,number(含有小数),digits(整数)
				'minlength'=>0
			]
		],
		'b_name'=>[
			'field'=>'b_name',
			'name'=>'账户名称',
			'type'=>'varchar',
			'key'=>false, //是否为主键
			'unique'=>ture, //是否唯一
			'maxlength'=>100, //长度(含有小数)
			'scale'=>0, //小数位数
			'issearch'=>true, //是否参入查询
			'islist'=>true, //是否在列表中显示
			'isview'=>true, //是否在详情视图中显示
			'isorder'=>true, 
			'list'=>['formatter'=>'link'], //列格式化
			'editor'=> [
				'required'=> true, //是否为必须项
				'type'=> 'text', //text,hidden,select,checkbox,radio,textarea
				'fieldtype'=> 'string',//string,number(含有小数),digits(整数)
				'minlength'=>0
			]
		],
		'b_account'=>[
			'field'=>'b_account',
			'name'=>'账号',
			'type'=>'varchar',
			'key'=>false, //是否为主键
			'unique'=>true, //是否唯一
			'maxlength'=>100, //长度(含有小数)
			'scale'=>0, //小数位数
			'issearch'=>true, //是否参入查询
			'islist'=>true, //是否在列表中显示
			'isview'=>true, //是否在详情视图中显示
			'isorder'=>true, 
			'editor'=> [
				'required'=> false, //是否为必须项
				'type'=> 'text', //text,hidden,select,checkbox,radio,textarea
				'fieldtype'=> 'string',//string,number(含有小数),digits(整数)
				'minlength'=>0
			]
		],
		'b_currency'=>[
			'field'=>'b_currency',
			'name'=>'币种',
			'type'=>'enum',
			'key'=>false, //是否为主键
			'unique'=>false, //是否唯一
			'maxlength'=>3, //长度(含有小数)
			'scale'=>0, //小数位数
			'issearch'=>true, //是否参入查询
			'islist'=>false, //是否在列表中显示
			'isview'=>true, //是否在详情视图中显示
			'isorder'=>true, 
			'editor'=> null
		],
		'b_remark'=>[
			'field'=>'b_remark',
			'name'=>'备注',
			'type'=>'varchar',
			'key'=>false, //是否为主键
			'unique'=>false, //是否唯一
			'maxlength'=>255, //长度(含有小数)
			'scale'=>0, //小数位数
			'issearch'=>true, //是否参入查询
			'islist'=>true, //是否在列表中显示
			'isview'=>true, //是否在详情视图中显示
			'isorder'=>true, 
			'editor'=> [
				'required'=> false, //是否为必须项
				'type'=> 'text', //text,hidden,select,checkbox,radio,textarea
				'fieldtype'=> 'string',//string,number(含有小数),digits(整数)
				'minlength'=>0
			]
		],
		'b_create_time'=>[
			'field'=>'b_create_time',
			'name'=>'创建时间',
			'type'=>'datetime',
			'key'=>false, //是否为主键
			'unique'=>false, //是否唯一
			'maxlength'=>19, //长度(含有小数)
			'scale'=>0, //小数位数
			'issearch'=>true, //是否参入查询
			'islist'=>false, //是否在列表中显示
			'isview'=>true, //是否在详情视图中显示
			'isorder'=>true, 
			'editor'=> null
		]
	],
];