From 1cc5980bc817b2c2aa2271e9b03cdd509fd3b9c4 Mon Sep 17 00:00:00 2001 From: Alex Savenko Date: Wed, 8 Feb 2017 12:47:44 -0500 Subject: [PATCH] proj model testing dev tools --- app/library/App/Model/Projects.php | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+), 0 deletions(-) create mode 100644 app/library/App/Model/Projects.php diff --git a/app/library/App/Model/Projects.php b/app/library/App/Model/Projects.php new file mode 100644 index 0000000..c024266 --- /dev/null +++ b/app/library/App/Model/Projects.php @@ -0,0 +1,83 @@ +setSchema("public"); + $this->belongsTo('user_id', '\User', 'id', ['alias' => 'User']); + } + + /** + * Returns table name mapped in the model. + * + * @return string + */ + public function getSource() + { + return 'projects'; + } + + /** + * Allows to query a set of records that match the specified conditions + * + * @param mixed $parameters + * @return Projects[]|Projects + */ + public static function find($parameters = null) + { + return parent::find($parameters); + } + + /** + * Allows to query the first record that match the specified conditions + * + * @param mixed $parameters + * @return Projects + */ + public static function findFirst($parameters = null) + { + return parent::findFirst($parameters); + } + +} -- libgit2 0.21.4