table('notice', ['engine' => 'InnoDB', 'comment' => '' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); $table->addColumn('title', 'string', ['limit' => 50,'null' => true,'signed' => true,'comment' => '标题',]) ->addColumn('content', 'text', ['limit' => MysqlAdapter::TEXT_REGULAR,'null' => true,'signed' => true,'comment' => '内容',]) ->addColumn('author', 'string', ['limit' => 50,'null' => true,'signed' => true,'comment' => '作者',]) ->addColumn('put_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '发布时间',]) ->addColumn('start_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '显示开始时间',]) ->addColumn('end_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '显示结束时间',]) ->addColumn('type', 'string', ['limit' => 20,'null' => false,'signed' => true,'comment' => '0-学校公告 1-班级公告',]) ->addColumn('school_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '学校id',]) ->addColumn('grade_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '年级id',]) ->addColumn('class_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '班级id',]) ->addColumn('enable', 'boolean', ['null' => false,'default' => 0,'signed' => true,'comment' => '0-禁用 1-启用',]) ->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建人ID',]) ->addColumn('created_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) ->addColumn('updated_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) ->addColumn('deleted_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '软删除',]) ->create(); } }