20230228022933_addf_ield_retreve_time.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use think\migration\Migrator;
  3. use think\migration\db\Column;
  4. class AddfIeldRetreveTime extends Migrator
  5. {
  6. /**
  7. * Change Method.
  8. *
  9. * Write your reversible migrations using this method.
  10. *
  11. * More information on writing migrations is available here:
  12. * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
  13. *
  14. * The following commands can be used in this method and Phinx will
  15. * automatically reverse them when rolling back:
  16. *
  17. * createTable
  18. * renameTable
  19. * addColumn
  20. * renameColumn
  21. * addIndex
  22. * addForeignKey
  23. *
  24. * Remember to call "create()" or "update()" and NOT "save()" when working
  25. * with the Table class.
  26. */
  27. public function change()
  28. {
  29. $this->table('crm_import_retrieve_log', ['comment'=>'资源库分配回收记录表'])
  30. ->addColumn('employee_id', 'integer', ['comment' => '员工id','default'=>0])
  31. ->addColumn('root_id', 'integer', ['comment' => '企业ID','default'=>0])
  32. ->addColumn('crm_res_id', 'integer', ['comment' => '资源库ID','default'=>0])
  33. ->addColumn('type', 'integer', ['comment' => '0分配,1回收','default'=>1])
  34. ->addColumn('source_type', 'integer', ['comment' => '操作位置 0志远装饰后台,1网销端后台,2小程序,3app','default'=>0])
  35. ->addColumn('count', 'integer', ['comment' => '分配/回收数量','default'=>0])
  36. ->addColumn('customer_ids', 'text', ['comment' => '操作客户id'])
  37. ->addColumn('addtime', 'integer', ['comment' => '操作时间','default'=>0])
  38. ->addColumn('operator_employee_id', 'integer', ['comment' => '操作人id','default'=>0])
  39. ->create();
  40. }
  41. }