table('exam_emp_result') ->addColumn('from', 'integer', ['limit'=> 11, 'comment'=>'0试卷考核,1新兵训练营考核,2历史考核' ,'default' => 0]) ->update(); $this->table('train_done_log') ->addColumn('from', 'integer', ['limit'=> 11, 'comment'=>'0试卷考核,1新兵训练营考核,2历史考核' ,'default' => 0]) ->update(); $this->table('camp') ->addColumn('root_id', 'integer', ['comment' => '企业id', 'default' => 0]) ->addColumn('title', 'string', ['comment'=>'训练营名称', 'default' => '']) ->addColumn('addtime', 'timestamp', ['default'=> 'CURRENT_TIMESTAMP', 'comment'=>'创建时间']) ->addColumn('start_date', 'date', ['comment'=>'结束日期', 'null' => true]) ->addColumn('end_date', 'date', ['comment'=>'结束日期', 'null' => true]) ->addColumn('pattern', 'integer', ['limit'=> 11, 'comment'=>'0日期,1闯关' ,'default' => 0]) ->addColumn('time', 'time', ['comment'=>'解锁时间', 'null' => true]) ->addColumn('day', 'integer', ['limit'=> 11, 'comment'=>'间隔天数' ,'default' => 0]) ->addColumn('del', 'integer', ['limit'=> 11, 'comment'=>'删除' ,'default' => 0]) ->addColumn('content', 'text', array('comment'=>'计划内容', 'null' => true)) ->create(); $this->table('camp_employee') ->addColumn('root_id', 'integer', ['comment' => '企业id', 'default' => 0]) ->addColumn('camp_id', 'integer', ['comment' => '训练营id', 'default' => 0]) ->addColumn('employee_id', 'integer', ['comment' => '指派id', 'default' => 0]) ->addColumn('now', 'integer', ['comment' => '0历史指派,1最新指派', 'default' => 0]) ->addColumn('state', 'string', ['comment'=>'状态', 'default' => '']) ->addColumn('addtime', 'timestamp', ['default'=> 'CURRENT_TIMESTAMP', 'comment'=>'创建时间']) ->addColumn('approve', 'integer', ['comment' => '0是否提交申请/是否训练,1待审核,2通过,3不通过,4直接转正', 'default' => 0]) ->addColumn('approve_time', 'timestamp', ['null' => true, 'comment'=>'创建时间']) ->addColumn('speed', 'string', ['comment'=>'进度', 'default' => '']) ->create(); $this->table('camp_plan') ->addColumn('root_id', 'integer', ['comment' => '企业id', 'default' => 0]) ->addColumn('camp_id', 'integer', ['comment' => '训练营id', 'default' => 0]) ->addColumn('type', 'integer', ['comment' => '0课程,1试卷', 'default' => 0]) ->addColumn('plan_id', 'integer', ['comment' => '计划id', 'default' => 0]) ->addColumn('title', 'string', ['comment'=>'标题', 'default' => '']) ->addColumn('con_id', 'integer', ['comment' => '课程或试卷id', 'default' => 0]) ->addColumn('del', 'integer', ['comment' => '删除', 'default' => 0]) ->create(); } }