|
|
@@ -1,5 +1,43 @@
|
|
|
<?php
|
|
|
|
|
|
+/**
|
|
|
+ * @property int $id
|
|
|
+ * @property int $project_id
|
|
|
+ * @property int $location_id
|
|
|
+ * @property int $tester_id
|
|
|
+ * @property int $status
|
|
|
+ * @property int $status_tester_invoice
|
|
|
+ * @property float $customer_fee
|
|
|
+ * @property float $test_fee
|
|
|
+ * @property string $test_time
|
|
|
+ * @property float $test_travel_cost
|
|
|
+ * @property string $shop_left
|
|
|
+ * @property string $shop_right
|
|
|
+ * @property string $attire
|
|
|
+ * @property int $challenge_stage
|
|
|
+ * @property string $challenge_description
|
|
|
+ * @property string $challenger_name
|
|
|
+ * @property string $challenger_description
|
|
|
+ * @property string $challenger_gender
|
|
|
+ * @property string $challenger_eye_contact
|
|
|
+ * @property string $additional_notes
|
|
|
+ * @property string $dts_due
|
|
|
+ * @property string $dts_start
|
|
|
+ * @property string $dts_end
|
|
|
+ * @property string $dts_tester_invoice_generated
|
|
|
+ * @property string $dts_tester_invoice_paid
|
|
|
+ * @property int $verifier_id
|
|
|
+ * @property string $verifier_notes
|
|
|
+ * @property bool $pass
|
|
|
+ * @property bool $retest
|
|
|
+ * @property string $dts_created
|
|
|
+ * @property string $dts_updated
|
|
|
+ * @property string $dts_assigned
|
|
|
+ * @property string $dts_verified
|
|
|
+ *
|
|
|
+ * @method Test get(int $id)
|
|
|
+ */
|
|
|
+
|
|
|
class Test extends Model {
|
|
|
|
|
|
protected static $table = "test";
|
|
|
@@ -322,6 +360,9 @@ class Test extends Model {
|
|
|
return Project::get($this->project_id);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return Location
|
|
|
+ */
|
|
|
public function getLocation() {
|
|
|
return Location::get($this->location_id);
|
|
|
}
|
|
|
@@ -372,16 +413,25 @@ class Test extends Model {
|
|
|
return "$mins min. $secs sec.";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return string Bootstrap class name
|
|
|
+ */
|
|
|
public function getPassClass() {
|
|
|
if(is_null($this->pass)) return "secondary";
|
|
|
return $this->pass ? "success" : "danger";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return string FA icon name without prefix
|
|
|
+ */
|
|
|
public function getPassIcon() {
|
|
|
if(is_null($this->pass)) return "clock";
|
|
|
return $this->pass ? "check-circle" : "times-circle";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return string Pending, Pass or Fail
|
|
|
+ */
|
|
|
public function getPassText() {
|
|
|
if(is_null($this->pass)) return __("Pending");
|
|
|
return $this->pass ? __("Pass") : __("Fail");
|