20210425114688_create_agent_applys.rb 987 B

1234567891011121314151617181920212223242526272829303132333435
  1. # encoding:utf-8
  2. class CreateAgentApplys < ActiveRecord::Migration
  3. def up
  4. create_table :agent_applys do |t|
  5. # 申请时间
  6. t.column :happen_time, :integer, :limit => 11, :default => 0
  7. # 申请人ID
  8. t.column :intro_user_id, :integer, :limit => 11, :default => 0
  9. #微信会员id
  10. t.column :wx_user_id, :integer, :limit => 11, :default => 0
  11. # 昵称
  12. t.column :nickname, :string, :limit => 255
  13. # 部门ID
  14. t.column :depart, :integer, :limit => 11, :default => 0
  15. # 审核人ID
  16. t.column :com_user_id, :integer, :limit => 11, :default => 0
  17. # 审核时间
  18. t.column :com_time, :integer, :limit => 11, :default => 0
  19. # 是否审核
  20. t.column :status, :boolean, :default=>0
  21. t.timestamps
  22. end
  23. add_index :agent_applys,:intro_user_id,:name => "idx_intro_user_id"
  24. add_index :agent_applys,:wx_user_id,:name => "idx_wx_user_id"
  25. end
  26. def down
  27. drop_table :agent_applys
  28. end
  29. end