diff --git a/includes/class-Skill.php b/includes/class-Skill.php index 2af2b41..5dc8be9 100644 --- a/includes/class-Skill.php +++ b/includes/class-Skill.php @@ -1,83 +1,88 @@ . trait SkillTrait { /** * Get the skill ID * * @return int */ public function getSkillID() { - return $this->nonnull( 'skill_ID' ); + return $this->nonnull( Skill::ID ); } /** * Get the skill UID * * @return int */ public function getSkillUID() { - return $this->get( 'skill_uid' ); + return $this->get( Skill::UID ); } /** * Normalize a Skill object */ protected function normalizeSkill() { - $this->integers( 'skill_ID' ); + $this->integers( Skill::ID ); } } /** * A Skill is something you are able to do it */ class Skill extends Queried { use SkillTrait; /** * Database table name */ const T = 'skill'; + /** + * ID column name + */ + const ID = 'skill_ID'; + /** * UID column name */ const UID = 'skill_uid'; /** * Title column name */ const TITLE = 'skill_title'; /** * Maximum UID length * * @override */ const MAXLEN_UID = 32; const SUBJECT = 'subject'; const PROGRAMMING = 'programming'; /** * Constructor */ public function __construct() { $this->normalizeSkill(); } }