Summary Files Commits Branches @commit @diff @stats
path: root / src / models / Company.php
diff options
context:
space:
mode:
Commitcc35f9a9e7f57e2afc48767a7f392529d448a072 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-04-03 17:56:31 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-04-03 17:56:31 +0300
Filesc2884db59edf6b5ef03fb56b7c90e6cbdaa87cdc /src/models/Company.php
devrix-job-board-cc35f9a9e7f57e2afc48767a7f392529d448a072.tar
devrix-job-board-cc35f9a9e7f57e2afc48767a7f392529d448a072.tar.gz
devrix-job-board-cc35f9a9e7f57e2afc48767a7f392529d448a072.zip
Parentefdeffeba81ba473dbd38aa5466590e306bffdb3 (diff)
By default the company table will now come with three company names
1 files changed, 7 insertions, 0 deletions
-rw-r--r--src/models/Company.php7
diff --git a/src/models/Company.php b/src/models/Company.php
index 965531e..58b1734 100644
--- a/src/models/Company.php
+++ b/src/models/Company.php
@@ -19,6 +19,13 @@ class Company extends DBModel {
'name ' . DB::STRING_TYPE,
);
self::$DB->createTable(self::TABLE_NAME, $columns);
+
+ // Since there is no real way to add companies, this serves as the only official way.
+ if (sizeof(self::getAllFromDB()) == 0) {
+ self::insertIntoDB(new Company("MegaCorp"));
+ self::insertIntoDB(new Company("Cool INC."));
+ self::insertIntoDB(new Company("Company Awesome Ltd."));
+ }
}
/* Create */