20210425114688_create_agent_applys.rb 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. # 手机号码
  14. t.column :mobile, :string, :limit => 128
  15. # 部门ID
  16. t.column :depart, :integer, :limit => 11, :default => 0
  17. # 审核人ID
  18. t.column :com_user_id, :integer, :limit => 11, :default => 0
  19. # 审核时间
  20. t.column :com_time, :integer, :limit => 11, :default => 0
  21. # 是否审核
  22. t.column :status, :boolean, :default=>0
  23. t.timestamps
  24. end
  25. add_index :agent_applys,:intro_user_id,:name => "idx_intro_user_id"
  26. add_index :agent_applys,:wx_user_id,:name => "idx_wx_user_id"
  27. end
  28. def down
  29. drop_table :agent_applys
  30. end
  31. end