diff options
| Commit | fb2645d444729d656a209ef586a13fb569429280 (patch) | |
|---|---|---|
| Author | 2021-04-03 18:27:33 +0300 | |
| Committer | 2021-04-03 18:27:33 +0300 | |
| Files | 91daafcdb8af6cd41551bbf442f4be77dee575a4 /src/models/JobOffer.php | |
| devrix-job-board-1.0.tar devrix-job-board-1.0.tar.gz devrix-job-board-1.0.zip | ||
| Parent | 67bc860ea4b3db5033a42038ab86d0df955c9295 (diff) | |
| Parent | 3b0cbc90e3046a8bb979c2b9a17fae5a94bb2707 (diff) | |
Merge pull request #3 from Syndamia/dev v1.0
Exam version finished
1 files changed, 9 insertions, 9 deletions
| -rw-r--r-- | src/models/JobOffer.php | 18 |
diff --git a/src/models/JobOffer.php b/src/models/JobOffer.php index b86ff86..4fd7acc 100644 --- a/src/models/JobOffer.php +++ b/src/models/JobOffer.php @@ -1,6 +1,6 @@ <?php -include_once("models/DBModel.php"); -include_once("models/Company.php"); +include_once('models/DBModel.php'); +include_once('models/Company.php'); /** * Model that contains the required JobOffer properties. It also contains the request methods to the job_offers table. @@ -22,17 +22,17 @@ class JobOffer extends DBModel { * Everything from here is static functionality */ - public const TABLE_NAME = "job_offers"; + public const TABLE_NAME = 'job_offers'; static function __constructStatic() { $columns = array( - "title " . DB::STRING_TYPE, - "description " . DB::STRING_TYPE, - "companyId " . DB::INTEGER_TYPE, // Requires a foreign key - "salary " . DB::FLOAT_TYPE, + 'title ' . DB::STRING_TYPE, + 'description ' . DB::STRING_TYPE, + 'companyId ' . DB::INTEGER_TYPE, // Requires a foreign key + 'salary ' . DB::FLOAT_TYPE, ); $foreignKeys = array( - DB::genFK("companyId", Company::TABLE_NAME, "id") + DB::genFK('companyId', Company::TABLE_NAME, 'id') ); self::$DB->createTable(self::TABLE_NAME, $columns, $foreignKeys); } @@ -77,7 +77,7 @@ class JobOffer extends DBModel { * @param JobOffer $jb */ static function updateFromDB($jb) { - self::$DB->updateById(self::TABLE_NAME, $jb->id, "title", $jb->title, "description", $jb->description, "companyId", $jb->companyId, "salary", $jb->salary); + self::$DB->updateById(self::TABLE_NAME, $jb->id, 'title', $jb->title, 'description', $jb->description, 'companyId', $jb->companyId, 'salary', $jb->salary); } /* Delete */ |
