Prechádzať zdrojové kódy

product package function develop--order base detail add send

abiao 4 rokov pred
rodič
commit
62b7db1a1d

+ 3 - 0
app/models/order_base_detail.rb

@@ -17,6 +17,7 @@ class OrderBaseDetail < ActiveRecord::Base
       field :title
       field :nums
       field :order_dt_id
+      field :send
     end
     show do
       field :id
@@ -25,6 +26,7 @@ class OrderBaseDetail < ActiveRecord::Base
       field :title
       field :nums
       field :order_dt_id
+      field :send
     end
 
     edit do
@@ -34,6 +36,7 @@ class OrderBaseDetail < ActiveRecord::Base
       field :title
       field :nums
       field :order_dt_id
+      field :send
     end
   end
 end

+ 2 - 1
config/locales/models/order_base_detail.yml

@@ -11,4 +11,5 @@ zh-CN:
         order_id: 订单ID
         order_no: 订单编号
         order_dt_id: 订单明细ID
-        nums: 数量
+        nums: 数量
+        send: 赠品

+ 2 - 0
db/migrate/20210305114641_create_product_items.rb

@@ -30,6 +30,8 @@ class CreateProductItems < ActiveRecord::Migration
       t.column :title, :string, :limit => 255
       # 数量
       t.column :nums, :integer, :limit => 11, :default => 0
+      # 是否赠品
+      t.column :send, :boolean, :default=>0
       t.timestamps
     end
     add_column :products, :package,  :boolean, :default=>0