# encoding:utf-8
class CreateBaseConfigs < ActiveRecord::Migration
  def up
    #基本配置表
    create_table :base_configs do |t|
      #购券支付金额
      t.column :buy_cash, :integer,:null=>false, :default => 0
      #购券实得金额
      t.column :send_cash, :integer,:null=>false, :default => 0
      #购券返佣
      t.column :cash_award, :integer,:null=>false, :default => 0
      #订单免运金额
      t.column :order_limit, :integer,:null=>false, :default => 0
      #运费
      t.column :freight, :integer,:null=>false, :default => 0
      #会员申店金额
      t.column :user_apply, :integer,:null=>false, :default => 0
      #会员申店反券
      t.column :user_cash, :integer,:null=>false, :default => 0
      #会员申店返佣
      t.column :user_award, :integer,:null=>false, :default => 0
      #代理申店金额
      t.column :agent_apply, :integer,:null=>false, :default => 0
      #代理申店反券
      t.column :agent_cash, :integer,:null=>false, :default => 0
      #代理申店返佣
      t.column :agent_award, :integer,:null=>false, :default => 0

      #备注
      t.column :remark,:string
      t.timestamps
    end
  end

  def down
    drop_table :base_configs

  end

end
