@@ -0,0 +1,37 @@
+# encoding:utf-8
+class UpdateOrder < ActiveRecord::Base
+ has_paper_trail
+ self.table_name = "update_orders"
+ has_ancestry
+ validates :order_id, presence: true
+
+ rails_admin do
+ navigation_label '商品管理'
+ weight -240
+ parent Order
+ list do
+ filters [:order_id,:express_order_no]
+ # include_all_fields
+ field :id
+ field :order_id
+ field :express_order_no
+ field :express_company
+ field :status
+ end
+ show do
+ edit do
+end
@@ -82,7 +82,9 @@ RailsAdmin.config do |config|
# except ['Address','WxUser', 'User','BalanceHistory', 'ProjectFollow', 'BalanceOrder', 'TakeCashOrder', 'UserBankcard', 'ProjectJoin']
end
export
- import
+ import do
+ only ["UpdateOrder"]
history_index do
# PAPER_TRAIL_AUDIT_MODEL
@@ -0,0 +1,11 @@
+zh-CN:
+ activerecord:
+ models:
+ update_order: 物流状态更新
+ attributes:
+ update_order:
+ id: Id
+ order_id: 订单号
+ express_order_no: 物流单号
+ express_company: 物流公司
+ status: 状态
@@ -0,0 +1,21 @@
+class CreateUpdateOrders < ActiveRecord::Migration
+ def up
+ #更改订单物流信息表
+ create_table :update_orders do |t|
+ # 订单ID
+ t.column :order_id, :string,:limit => 256
+ # 物流编号
+ t.column :express_order_no, :string,:limit => 256
+ # 物流公司
+ t.column :express_company, :string,:limit => 256
+ # 是否处理
+ t.column :status, :boolean, :default=>1
+ t.timestamps
+ def down
+ drop_table :update_orders