Summary Files Commits Branches @commit @diff @stats
path: root / src / models / JobOffer.php
diff options
context:
space:
mode:
Commiteee825eb3ed35268c647a0e50904197eb2e953c5 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-03-31 21:40:34 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-03-31 21:40:34 +0300
Files7a0ad17631bb755401ea11b6501026d954c436ac /src/models/JobOffer.php
devrix-job-board-eee825eb3ed35268c647a0e50904197eb2e953c5.tar
devrix-job-board-eee825eb3ed35268c647a0e50904197eb2e953c5.tar.gz
devrix-job-board-eee825eb3ed35268c647a0e50904197eb2e953c5.zip
Parent067e78d5d64adbf52c911f0f65cdaa7f8156e903 (diff)
Added JobOffer model and implemented a basic system for creating tables
1 files changed, 18 insertions, 0 deletions
-rw-r--r--src/models/JobOffer.php18
diff --git a/src/models/JobOffer.php b/src/models/JobOffer.php
new file mode 100644
index 0000000..1fb3d28
--- /dev/null
+++ b/src/models/JobOffer.php
@@ -0,0 +1,18 @@
+<?php
+include_once("DB.php");
+
+class JobOffer {
+ public const TABLE_NAME = "job_offers";
+ public const TABLE_COLUMNS = array("title " . DB::STRING_TYPE, "description " . DB::STRING_TYPE, "company " . DB::STRING_TYPE, "salary " . DB::FLOAT_TYPE);
+
+ public string $title;
+ public string $description;
+ public string $company;
+ public float $salary;
+
+ private DB $db;
+
+ function __construct(DB $db) {
+ $this->db = $db;
+ }
+}