table('activity_sign', ['comment' => '活动报名表', 'engine'=>'InnoDB']); $table->addColumn('uid', 'integer',array('comment'=>'客户id','default'=> 0)) ->addColumn('root_id', 'integer',array('comment'=>'店面id','default'=> 0)) ->addColumn('aid', 'integer',array('comment'=>'活动id','default'=> 0)) ->addColumn('share_uid', 'integer',array('comment'=>'分享人uid','default'=> 0)) ->addColumn('share_employee_id', 'integer',array('comment'=>'分享人业务员id','default'=> 0)) ->addColumn('qrcode', 'string', ['limit' => 255, 'comment' => '报名二维码', 'null' => true, 'default' => '']) ->addColumn('qrcode_con', 'string', ['limit' => 255, 'comment' => '二维码内容', 'null' => true, 'default' => '']) ->addColumn('qrcode_status', 'integer',array('comment'=>'是否扫码','default'=> 0)) ->addColumn('addtime', 'timestamp',array('comment'=>'添加时间','default'=> 'CURRENT_TIMESTAMP')) ->create(); //员工管理增加是否是扫码人员 $this->table('employee') ->addColumn('code_scanning_personnel', 'integer', ['comment' => '是否是活动扫码人员 0否,1是', 'default' => 0]) ->update(); //添加权限 $per3 = ',employee/codeScanning'; $w3[] = ['auth_name', '=', '员工管理']; $info3 = Permission::where($w3)->find(); $per3 = $info3->relation . $per3; $info3->relation = $per3; $info3->save(); } }