20230214074719_create_vr_view.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. use think\migration\Migrator;
  3. use think\migration\db\Column;
  4. class CreateVrView 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('vr_view', ['comment' => 'vr作品场景'])
  30. ->addColumn('view_title', 'string', ['comment' => '标题', 'null' => true])
  31. ->addColumn('createtime', 'integer', ['comment' => '创建时间'])
  32. ->addColumn('updatetime', 'integer', ['comment' => '更新时间'])
  33. ->addColumn('pic_path', 'string', ['comment' => 'vr图片路径'])
  34. ->addColumn('emp_id', 'integer', ['comment' => '创建人', 'null' => true])
  35. ->addColumn('root_id', 'integer', ['comment' => '店面id','default'=>0])
  36. ->addColumn('org_path', 'string', ['comment' => '部门路径', 'null' => true])
  37. ->addColumn('size', 'integer', ['comment' => '封面大小'])
  38. ->addColumn('sort', 'integer', ['comment' => '排序', 'length'=>2])
  39. ->addColumn('vr_group_id', 'integer', ['comment' => 'vr图片路径'])
  40. ->addColumn('point', 'json', ['comment'=>'锚点', 'null' => true])
  41. ->addColumn('oriented', 'json', ['comment'=>'面向方向', 'null' => true])
  42. ->addColumn('vr_path', 'string', ['comment' => 'vr路径', 'null' => true,'default'=>''])
  43. ->addColumn('logo_path', 'string', ['comment' => '遮罩', 'null' => true,'default'=>''])
  44. ->addColumn('mask', 'string', ['comment' => '遮罩', 'null' => true,'default'=>''])
  45. ->addColumn('hlookat', 'string', ['comment' => '', 'null' => true,'default'=>''])
  46. ->addColumn('vlookat', 'string', ['comment' => '', 'null' => true,'default'=>''])
  47. ->addColumn('hotspot', 'string', ['comment' => '', 'null' => true,'default'=>''])
  48. ->addColumn('structure', 'string', ['comment' => '文件夹结构', 'null' => true,'default'=>''])
  49. ->addColumn('cut_img_time', 'integer', ['comment' => '切图开始时间', 'length'=>2,'default'=>0])
  50. ->addColumn('cut_img_status', 'integer', ['comment' => '切图状态0未开始1切图中2切图完成', 'length'=>2,'default'=>0])
  51. ->addColumn('cut_img_ing', 'integer', ['comment' => '切图等待中0未开始等待大于0开始等待', 'length'=>2,'default'=>0])
  52. ->addColumn('cut_img_size', 'integer', ['comment' => '切图成功后,8张切片的总大小', 'length'=>2,'default'=>0])
  53. ->create();
  54. }
  55. }