rabin 3 月之前
父节点
当前提交
a9b3a85947
共有 3 个文件被更改,包括 53 次插入64 次删除
  1. 2 2
      lib/Relation.php
  2. 23 28
      table/code.php
  3. 28 34
      table/relation.php

+ 2 - 2
lib/Relation.php

@@ -117,10 +117,10 @@ class Relation
             $where['level'] = $level;
         }
         if ($start) {
-            $where['cdate#'] = array('>=', strtotime($start));
+            $where['cdate#'] = ['>=', strtotime($start)];
         }
         if ($end) {
-            $where['cdate##'] = array('<=', strtotime($end));
+            $where['cdate##'] = ['<=', strtotime($end)];
         }
         $method = 'select';
         if ($method == 'count') {

+ 23 - 28
table/code.php

@@ -1,28 +1,23 @@
-<?php
-return array
-(
-    'name' => '邀请码',
-    'partition' => 'Dever::call("manage/common.system")',
-    # 数据结构
-    'struct' => array
-    (
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '用户',
-        ),
-
-        'value'      => array
-        (
-            'name'      => '名称',
-            'type'      => 'varchar(30)',
-        ),
-    ),
-
-    /*
-    'index' => array
-    (
-        'search' => 'uid,value',
-    ),
-    */
-);
+<?php
+return [
+    'name' => '邀请码',
+    'partition' => 'Dever::call("manage/common.system")',
+    # 数据结构
+    'struct' => [
+        'uid'       => [
+            'type'      => 'int(11)',
+            'name'      => '用户',
+        ],
+
+        'value'      => [
+            'name'      => '名称',
+            'type'      => 'varchar(30)',
+        ],
+    ],
+
+    /*
+    'index' => [
+        'search' => 'uid,value',
+    ],
+    */
+];

+ 28 - 34
table/relation.php

@@ -1,34 +1,28 @@
-<?php
-return array
-(
-    'name' => '邀请关系',
-    'partition' => 'Dever::call("manage/common.system")',
-    # 数据结构
-    'struct' => array
-    (
-        'uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '邀请人',
-        ),
-
-        'to_uid'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '被邀请人',
-        ),
-
-        'level'       => array
-        (
-            'type'      => 'int(11)',
-            'name'      => '邀请级数',
-        ),
-    ),
-
-    /*
-    'index' => array
-    (
-        'search' => 'uid,value',
-    ),
-    */
-);
+<?php
+return [
+    'name' => '邀请关系',
+    'partition' => 'Dever::call("manage/common.system")',
+    # 数据结构
+    'struct' => [
+        'uid'       => [
+            'type'      => 'int(11)',
+            'name'      => '邀请人',
+        ],
+
+        'to_uid'       => [
+            'type'      => 'int(11)',
+            'name'      => '被邀请人',
+        ],
+
+        'level'       => [
+            'type'      => 'int(11)',
+            'name'      => '邀请级数',
+        ],
+    ],
+
+    /*
+    'index' => [
+        'search' => 'uid,value',
+    ],
+    */
+];