浏览代码

promotion add cash and cent

abiao 5 年之前
父节点
当前提交
de541bf36c
共有 3 个文件被更改,包括 12 次插入0 次删除
  1. 6 0
      app/models/promotion.rb
  2. 2 0
      config/locales/models/promotion.yml
  3. 4 0
      db/migrate/20201102114643_create_promotions.rb

+ 6 - 0
app/models/promotion.rb

@@ -100,6 +100,8 @@ class Promotion < ActiveRecord::Base
           field :send_prodcut1
           field :send_prodcut2
           field :send_prodcut3
+          field :cash
+          field :cent
           field :is_enable
           field :created_at
         end
@@ -137,6 +139,8 @@ class Promotion < ActiveRecord::Base
           field :send_prodcut2
           field :send_prodcut3
           field :is_enable
+          field :cash
+          field :cent
           field :created_at
           field :created_at
           field :updated_at
@@ -168,6 +172,8 @@ class Promotion < ActiveRecord::Base
           field :send_nums2
           field :send_prod3
           field :send_nums3
+          field :cash
+          field :cent
           field :is_enable
         end
     end

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

@@ -31,5 +31,7 @@ zh-CN:
         send_prodcut1: 赠品1
         send_prodcut2: 赠品2
         send_prodcut3: 赠品3
+        cash: 赠代办费
+        cent: 赠积分
         created_at: 创建时间
         updated_at: 更新时间

+ 4 - 0
db/migrate/20201102114643_create_promotions.rb

@@ -45,6 +45,10 @@ class CreatePromotions < ActiveRecord::Migration
       t.column :send_nums3, :integer, :limit => 11, :default => 0
       # 状态
       t.column :is_enable, :boolean, :default=>1
+      # 赠代办金
+      t.column :cash, :integer, :limit => 11, :default => 0
+      # 赠积分
+      t.column :cent, :integer, :limit => 11, :default => 0
       t.timestamps
     end
     add_index :shop_applications, :user_id