dever 3 years ago
parent
commit
460ea7f8fd
3 changed files with 44 additions and 9 deletions
  1. 15 1
      app/factory/database/goods.php
  2. 12 7
      app/shop/database/goods.php
  3. 17 1
      app/store/database/goods.php

+ 15 - 1
app/factory/database/goods.php

@@ -20,7 +20,7 @@ return array
             # 条件,另外一个表的字段 => 本表的字段
             'where' => array('id' => 'goods_id'),
             # 要填充的数据,另外一个表的字段 => 本表的字段,如果不填写就是所有的
-            'update' => array('price_type'),
+            'update' => array('price_type' => 'price_type', 'status' => 'status'),
             # 不需要填充的字段 与update互斥
             //'no' => array('id', 'seller_id', 'service_id', 'chose', 'state', 'cdate')
         )
@@ -106,6 +106,20 @@ return array
             //'list'      => true,
         ),
 
+        'status'        => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '状态',
+            'default'   => '2',
+            'desc'      => '状态',
+            'match'     => 'is_numeric',
+            //'update'  => 'select',
+            'option'    => $status,
+            'search'    => 'select',
+            'list'      => true,
+            'edit'      => true,
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',

+ 12 - 7
app/shop/database/goods.php

@@ -1,5 +1,5 @@
 <?php
-
+$status = Dever::config('base')->status;
 return array
 (
     # 表名
@@ -21,7 +21,7 @@ return array
             # 条件,另外一个表的字段 => 本表的字段
             'where' => array('id' => 'goods_id'),
             # 要填充的数据,另外一个表的字段 => 本表的字段,如果不填写就是所有的
-            'update' => array('price_type' => 'price_type'),
+            'update' => array('price_type' => 'price_type', 'status' => 'status'),
             # 不需要填充的字段 与update互斥
             //'no' => array('id', 'seller_id', 'service_id', 'chose', 'state', 'cdate')
         )
@@ -116,13 +116,18 @@ return array
             //'list'      => true,
         ),
 
-        'price_type'        => array
+        'status'        => array
         (
-            'type'      => 'int-11',
-            'name'      => '价格类型',
-            'default'   => '1',
-            'desc'      => '价格类型',
+            'type'      => 'tinyint-1',
+            'name'      => '状态',
+            'default'   => '2',
+            'desc'      => '状态',
             'match'     => 'is_numeric',
+            //'update'  => 'select',
+            'option'    => $status,
+            'search'    => 'select',
+            'list'      => true,
+            'edit'      => true,
         ),
 
         'state'     => array

+ 17 - 1
app/store/database/goods.php

@@ -1,4 +1,6 @@
 <?php
+
+$status = Dever::config('base')->status;
 return array
 (
     # 表名
@@ -20,7 +22,7 @@ return array
             # 条件,另外一个表的字段 => 本表的字段
             'where' => array('id' => 'goods_id'),
             # 要填充的数据,另外一个表的字段 => 本表的字段,如果不填写就是所有的
-            'update' => array('price_type'),
+            'update' => array('price_type' => 'price_type', 'status' => 'status'),
             # 不需要填充的字段 与update互斥
             //'no' => array('id', 'seller_id', 'service_id', 'chose', 'state', 'cdate')
         )
@@ -115,6 +117,20 @@ return array
             //'list'      => true,
         ),
 
+        'status'        => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '状态',
+            'default'   => '2',
+            'desc'      => '状态',
+            'match'     => 'is_numeric',
+            //'update'  => 'select',
+            'option'    => $status,
+            'search'    => 'select',
+            'list'      => true,
+            'edit'      => true,
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',