Fix wiki and qa implementation

This commit is contained in:
Dennis Eichhorn 2017-03-21 20:58:05 +01:00
parent 722264dc4f
commit 18cc89225e
6 changed files with 11 additions and 13 deletions

View File

@ -63,7 +63,7 @@ class Installer extends InstallerAbstract
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'qa_badge` ( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'qa_badge` (
`qa_badge_id` int(11) NOT NULL AUTO_INCREMENT, `qa_badge_id` int(11) NOT NULL AUTO_INCREMENT,
`qa_badge_name` varchar(255) NOT NULL, `qa_badge_name` varchar(255) NOT NULL,
PRIMARY KEY (`qa_category_id`) PRIMARY KEY (`qa_badge_id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
)->execute(); )->execute();
@ -92,9 +92,9 @@ class Installer extends InstallerAbstract
$dbPool->get('core')->con->prepare( $dbPool->get('core')->con->prepare(
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'qa_question_badge` ( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'qa_question_badge` (
`qa_question_badge_id` int(11) NOT NULL AUTO_INCREMENT, `qa_question_badge_id` int(11) NOT NULL AUTO_INCREMENT,
`qa_question_badge_question` varchar(255) NOT NULL, `qa_question_badge_question` int(11) NOT NULL,
`qa_question_badge_badge` int(11) DEFAULT NULL, `qa_question_badge_badge` int(11) DEFAULT NULL,
PRIMARY KEY (`qa_category_id`), PRIMARY KEY (`qa_question_badge_id`),
KEY `qa_question_badge_question` (`qa_question_badge_question`), KEY `qa_question_badge_question` (`qa_question_badge_question`),
KEY `qa_question_badge_badge` (`qa_question_badge_badge`) KEY `qa_question_badge_badge` (`qa_question_badge_badge`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'

View File

@ -27,11 +27,11 @@ namespace Modules\QA\Models;
* @link http://orange-management.com * @link http://orange-management.com
* @since 1.0.0 * @since 1.0.0
*/ */
class QAQuestion implements \JsonSerializable class QAAnswer implements \JsonSerializable
{ {
private $id = 0; private $id = 0;
private $status = QAStatus::ACTIVE; private $status = QAAnswerStatus::ACTIVE;
private $answer = ''; private $answer = '';
@ -61,7 +61,7 @@ class QAQuestion implements \JsonSerializable
$this->answer = $answer; $this->answer = $answer;
} }
public function getQuestion() : string public function getQuestion() : int
{ {
return $this->question; return $this->question;
} }

View File

@ -14,7 +14,7 @@
* @link http://orange-management.com * @link http://orange-management.com
*/ */
declare(strict_types=1); declare(strict_types=1);
namespace Modules\Badge\Models; namespace Modules\QA\Models;
/** /**
* Task class. * Task class.

View File

@ -33,7 +33,7 @@ class QACategory implements \JsonSerializable
private $name = ''; private $name = '';
private $parent = 0; private $parent = null;
public function __construct() public function __construct()
{ {
@ -54,7 +54,7 @@ class QACategory implements \JsonSerializable
$this->name = $name; $this->name = $name;
} }
public function getParent() : int public function getParent() /* : ?int */
{ {
return $this->parent; return $this->parent;
} }

View File

@ -99,7 +99,7 @@ class QAQuestion implements \JsonSerializable
$this->status = $status; $this->status = $status;
} }
public function getCategory() : int public function getCategory()
{ {
return $this->category; return $this->category;
} }

View File

@ -17,9 +17,7 @@
"description": "QA module.", "description": "QA module.",
"directory": "QA", "directory": "QA",
"dependencies": { "dependencies": {
"Admin" : "1.0.0", "Admin" : "1.0.0"
"Tasks" : "1.0.0",
"Calendar" : "1.0.0"
}, },
"providing": { "providing": {
"Navigation": "*" "Navigation": "*"