Quellcode durchsuchen

add orders list file

abiao vor 4 Jahren
Ursprung
Commit
0771dd1193

+ 6 - 2
app/models/product_warn.rb

@@ -14,6 +14,8 @@ class ProductWarn < ActiveRecord::Base
       field :happen_time
       field :product_id
       field :product_name
+      field :product_type
+      field :product_size
       field :sale_90
       field :sale_30
       field :sale_10
@@ -23,7 +25,7 @@ class ProductWarn < ActiveRecord::Base
       field :min_purchase
       field :history_day_sales
       field :recommend_count
-      field :created_at
+      #field :created_at
       # field :updated_at
     end
     show do
@@ -31,6 +33,8 @@ class ProductWarn < ActiveRecord::Base
       field :happen_time
       field :product_id
       field :product_name
+      field :product_type
+      field :product_size
       field :sale_90
       field :sale_30
       field :sale_10
@@ -40,7 +44,7 @@ class ProductWarn < ActiveRecord::Base
       field :min_purchase
       field :history_day_sales
       field :recommend_count
-      field :created_at
+        # field :created_at
       # field :updated_at
     end
     edit do

+ 2 - 0
config/locales/models/product_warn.yml

@@ -8,6 +8,8 @@ zh-CN:
         happen_time: 统计时间
         product_id: 商品ID
         product_name: 商品名称
+        product_type: 商品类型
+        product_size: 商品规格
         sale_90: 近90日销售
         sale_30: 近30日销售
         sale_10: 近10日销售

+ 4 - 0
db/migrate/20210415114688_create_product_warns.rb

@@ -9,6 +9,10 @@ class CreateProductWarns < ActiveRecord::Migration
       t.column :product_id, :integer, :limit => 4, :null => false, :default => 0
       # 商品名称
       t.column :product_name, :string, :limit => 128,  :null => false,:default => ""
+      # 商品类型
+      t.column :product_type, :string, :limit => 128,  :null => false,:default => ""
+      # 商品规格
+      t.column :product_size, :string, :limit => 128,  :null => false,:default => ""
       # 近90日销售
       t.column :sale_90, :integer, :limit => 11, :null => false, :default => 0
       # 近30日销售