20230402105616_create_renovate_price_table.php 1.1 KB

1234567891011121314151617181920212223
  1. <?php
  2. use think\migration\Migrator;
  3. use think\migration\db\Column;
  4. use app\model\CustomerPortraitField;
  5. class CreateRenovatePriceTable extends Migrator
  6. {
  7. public function change()
  8. {
  9. $this->table('renovate_price')
  10. ->addColumn('root_id', 'integer', ['comment'=>'企业id', 'limit'=>11, 'default'=>0])
  11. ->addColumn('package_name', 'string', ['comment'=>'套餐名称', 'limit'=>255, 'null'=>true])
  12. ->addColumn(Column::decimal('service_price',10)->setComment('服务费')->setDefault(0))
  13. ->addColumn(Column::decimal('devise_price',10)->setComment('设计费')->setDefault(0))
  14. ->addColumn('remark', 'string', ['comment'=>'备注', 'limit'=>2000, 'null'=>true])
  15. //->addColumn('itemcount', 'text', ['comment'=>'包含的项目', 'null'=>true])
  16. ->addColumn(Column::tinyInteger('status')->setComment('状态')->setDefault(0))
  17. ->addColumn(Column::tinyInteger('sort')->setComment('排序')->setDefault(0))
  18. ->addColumn('addtime', 'timestamp', ['default'=> 'CURRENT_TIMESTAMP', 'comment'=> '添加时间'])
  19. ->create();
  20. }
  21. }