|
@@ -0,0 +1,88 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+# 常用的col
|
|
|
+$col = '*';
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'company',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '公司管理',
|
|
|
+ 'order' => 7,
|
|
|
+
|
|
|
+ # 数据结构
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-80',
|
|
|
+ 'name' => '公司名称',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '公司名称',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'list' => true,
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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,
|
|
|
+ 'list' => 'date("Y-m-d H:i", {cdate})',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'default' => array
|
|
|
+ (
|
|
|
+ 'col' => 'id,name,state,cdate',
|
|
|
+ 'value' => array
|
|
|
+ (
|
|
|
+ '1,"默认公司", 1,' . DEVER_TIME,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ # 管理功能
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ 'delete' => false,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getIds' => array
|
|
|
+ (
|
|
|
+ 'type' => 'all',
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'ids' => array('yes-id', 'in'),
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'order' => array('id' => 'desc'),
|
|
|
+ 'col' => '*|id',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|