| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # encoding: utf-8
- class ProductWarn < ActiveRecord::Base
- has_paper_trail
- self.table_name = "product_warns"
- validates :happen_time,:product_id,:sale_90,presence: true
- rails_admin do
- navigation_label '商品管理'
- parent Product
- weight -500
- list do
- filters [:happen_time,:product_id]
- field :id
- field :happen_time
- field :product_id
- field :product_name
- field :product_type
- field :product_size
- field :sale_90
- field :sale_30
- field :sale_10
- field :now_count
- field :product_cycle
- field :stock_cycle
- field :min_purchase
- field :history_day_sales
- field :recommend_count
- #field :created_at
- # field :updated_at
- end
- show do
- field :id
- field :happen_time
- field :product_id
- field :product_name
- field :product_type
- field :product_size
- field :sale_90
- field :sale_30
- field :sale_10
- field :now_count
- field :product_cycle
- field :stock_cycle
- field :min_purchase
- field :history_day_sales
- field :recommend_count
- # field :created_at
- # field :updated_at
- end
- edit do
- field :happen_time
- field :product_id
- field :product_name
- field :sale_90
- field :sale_30
- field :sale_10
- field :now_count
- field :product_cycle
- field :stock_cycle
- field :min_purchase
- field :history_day_sales
- field :recommend_count
- end
- end
- end
|