diff options
Diffstat (limited to 'plugins/InternalID/Model')
-rw-r--r-- | plugins/InternalID/Model/InternalTaskIDModel.php | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/InternalID/Model/InternalTaskIDModel.php b/plugins/InternalID/Model/InternalTaskIDModel.php new file mode 100644 index 00000000..55a68192 --- /dev/null +++ b/plugins/InternalID/Model/InternalTaskIDModel.php @@ -0,0 +1,58 @@ +<?php + +namespace Kanboard\Plugin\InternalID\Model; + +use Kanboard\Core\Base; + +/** + * Internal Task ID Model + * + * @package InternalID\Model + * @author mkl + */ +class InternalTaskIDModel extends Base +{ + /** + * Table name + * + * @var string + */ + const TABLE = 'internal_task_id'; + + /** + * Get the table + * + * @abstract + * @access protected + * @return string + */ + public function getTable() + { + return self::TABLE; + } + + /** + * Define the path prefix + * + * @abstract + * @access protected + * @return string + */ + public function getPathPrefix() + { + return 'internalid'; + } + + /** + * Get by the Task ID + * + * @access public + * @param integer $task_id Task ID (global) + * @return array + */ + public function getById($task_id) + { + return $this->db->table($this->getTable())->eq('id', $task_id)->findOne(); + } + +} |