20201130114699_create_base_configs.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # encoding:utf-8
  2. class CreateBaseConfigs < ActiveRecord::Migration
  3. def up
  4. #基本配置表
  5. create_table :base_configs do |t|
  6. #购券支付金额
  7. t.column :buy_cash, :integer,:null=>false, :default => 0
  8. #购券实得金额
  9. t.column :send_cash, :integer,:null=>false, :default => 0
  10. #购券返佣
  11. t.column :cash_award, :integer,:null=>false, :default => 0
  12. #订单免运金额
  13. t.column :order_limit, :integer,:null=>false, :default => 0
  14. #运费
  15. t.column :freight, :integer,:null=>false, :default => 0
  16. #会员申店金额
  17. t.column :user_apply, :integer,:null=>false, :default => 0
  18. #会员申店反券
  19. t.column :user_cash, :integer,:null=>false, :default => 0
  20. #会员申店返佣
  21. t.column :user_award, :integer,:null=>false, :default => 0
  22. #代理申店金额
  23. t.column :agent_apply, :integer,:null=>false, :default => 0
  24. #代理申店反券
  25. t.column :agent_cash, :integer,:null=>false, :default => 0
  26. #代理申店返佣
  27. t.column :agent_award, :integer,:null=>false, :default => 0
  28. #备注
  29. t.column :remark,:string
  30. t.timestamps
  31. end
  32. end
  33. def down
  34. drop_table :base_configs
  35. end
  36. end