2017_11_15_130911_create_crm_leads_table.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. /**
  6. * Migration auto-generated by Sequel Pro Laravel Export
  7. * @see https://github.com/cviebrock/sequel-pro-laravel-export
  8. */
  9. class CreateCrmLeadsTable extends Migration
  10. {
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('crm_leads', function (Blueprint $table) {
  19. $table->increments('id')->comment('线索主键');
  20. $table->integer('owner_id')->comment('拥有者');
  21. $table->integer('creator_id')->comment('创建者');
  22. $table->string('name', 255)->comment('姓名或单位');
  23. $table->string('phone', 255)->comment('电话');
  24. $table->string('position', 20)->comment('职位');
  25. $table->string('email', 50)->comment('电子邮箱');
  26. $table->string('company', 255)->comment('公司');
  27. $table->string('address', 500)->comment('地址');
  28. $table->text('remark')->comment('备注');
  29. $table->string('source', 500)->comment('线索来源');
  30. $table->tinyInteger('status')->comment('状态:1线索池,2已领取,3已成交');
  31. $table->timestamp('have_time')->comment('领取时间');
  32. $table->timestamps();
  33. $table->softDeletes();
  34. });
  35. }
  36. /**
  37. * Reverse the migrations.
  38. *
  39. * @return void
  40. */
  41. public function down()
  42. {
  43. Schema::dropIfExists('crm_leads');
  44. }
  45. }