| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 | 
							- <?php
 
- /*
 
- |--------------------------------------------------------------------------
 
- | role.php 角色表
 
- |--------------------------------------------------------------------------
 
- */
 
- # 定义几个常用的选项
 
- $option = array
 
- (
 
- 	1 => '可用',
 
- 	2 => '不可用',
 
- );
 
- $area = function()
 
- {
 
- 	return Dever::load('setting/area-getAll', array('where_area_id_parent' => 0));
 
- };
 
- $config = array
 
- (
 
- 	# 表名
 
- 	'name' => 'group',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '管理组设置',
 
- 	'order' => 8,
 
- 	# 表类型 值为\innodb\myisam\,默认为innodb,仅在mysql类型有效
 
- 	'type' => 'innodb',
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '组ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			'list'		=> true,
 
- 		),
 
- 		
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-50',
 
- 			'name' 		=> '组名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入组名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			//'list_name'	=> '角色名',//定义列表页的名称
 
- 			'list'		=> true,
 
- 			'edit'		=> true,
 
- 		),
 
- 		'area'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-255',
 
- 			'name' 		=> '区域',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请选择区域',
 
- 			'match' 	=> 'option',
 
- 			//'update'	=> 'checkbox',
 
- 			//'option'	=> $area,
 
- 		),
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择状态',
 
- 			'match' 	=> 'is_numeric',
 
- 		),
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '录入时间',
 
- 			'match' 	=> array('is_numeric', DEVER_TIME),
 
- 			'desc' 		=> '',
 
- 			# 只有insert时才生效
 
- 			'insert'	=> true,
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	# 默认值
 
- 	'default' => array
 
- 	(
 
- 		'col' => 'name,state,cdate',
 
- 		'value' => array
 
- 		(
 
- 			'"默认分组",1,' . DEVER_TIME,
 
- 		),
 
- 	),
 
- 	
 
- 	# 后台管理 此处的功能全部开放
 
- 	'manage' => array
 
- 	(
 
- 		
 
- 	),
 
- );
 
- return $config;
 
 
  |