|
@@ -0,0 +1,156 @@
|
|
|
+<?php
|
|
|
+/**
|
|
|
+ * tester
|
|
|
+ */
|
|
|
+
|
|
|
+$status = array
|
|
|
+(
|
|
|
+ 1 => '回退中',
|
|
|
+ 2 => '回退成功',
|
|
|
+ 3 => '回退失败',
|
|
|
+);
|
|
|
+
|
|
|
+$user = function()
|
|
|
+{
|
|
|
+ $array = array();
|
|
|
+ $info = Dever::load('component/user-state');
|
|
|
+ if($info)
|
|
|
+ {
|
|
|
+ $array += $info;
|
|
|
+ }
|
|
|
+ return $array;
|
|
|
+};
|
|
|
+
|
|
|
+$template = function()
|
|
|
+{
|
|
|
+ $array = array();
|
|
|
+ $info = Dever::load('component/template-state');
|
|
|
+ if($info)
|
|
|
+ {
|
|
|
+ $array += $info;
|
|
|
+ }
|
|
|
+ return $array;
|
|
|
+};
|
|
|
+
|
|
|
+$version = function()
|
|
|
+{
|
|
|
+ $array = array();
|
|
|
+ $info = Dever::load('component/version-state');
|
|
|
+ if($info)
|
|
|
+ {
|
|
|
+ $array += $info;
|
|
|
+ }
|
|
|
+ return $array;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+return array
|
|
|
+(
|
|
|
+ # 表名
|
|
|
+ 'name' => 'revert',
|
|
|
+ # 显示给用户看的名称
|
|
|
+ 'lang' => '版本回退历史',
|
|
|
+ 'order' => 1,
|
|
|
+ # 数据结构
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'order',
|
|
|
+ //'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'project_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '项目',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '请输入项目',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'version_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '版本',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '版本',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'search' => 'order,fulltext',
|
|
|
+ 'update' => 'checkbox',
|
|
|
+ 'option' => $version,
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'user_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '用户',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '用户',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ //'search' => 'order,fulltext',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'option' => $user,
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'result' => array
|
|
|
+ (
|
|
|
+ 'type' => 'text-255',
|
|
|
+ 'name' => '微信返回信息',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '微信返回信息',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'textarea',
|
|
|
+ 'list' => true,
|
|
|
+ 'modal' => '查看详情',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'status' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '回退状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '回退状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'option' => $status,
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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:s", {cdate})',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'top' => Dever::config('base')->top,
|
|
|
+
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ 'edit' => false,
|
|
|
+ 'delete' => false,
|
|
|
+ 'insert' => false,
|
|
|
+ ),
|
|
|
+);
|