Selaa lähdekoodia

add cent product

abiao 5 vuotta sitten
vanhempi
commit
06c3820191
2 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 1 1
      app/models/product.rb
  2. 3 0
      db/migrate/20201109114688_create_order_refunds.rb

+ 1 - 1
app/models/product.rb

@@ -40,7 +40,7 @@ class Product < ActiveRecord::Base
     end
 
 
-    TYPE_ENUM = [["直营","direct_sale"],["店铺专区","shop_sale"]]
+    TYPE_ENUM = [["直营","direct_sale"],["店铺专区","shop_sale"],["积分专区","cent_sale"]]
     SIZE_ENUM =  []
     COLOR_ENUM =  []
     def get_size_enum

+ 3 - 0
db/migrate/20201109114688_create_order_refunds.rb

@@ -22,10 +22,13 @@ class CreateOrderRefunds < ActiveRecord::Migration
       t.timestamps
     end
     add_index :order_refunds, :order_id
+    add_column :orders, :cent_price,:integer,:limit => 11
+
   end
 
   def down
     drop_table :order_refunds
+    remove_column :orders, :cent_price
   end
 
 end