exam add duration

This commit is contained in:
xiaomlove
2021-05-06 01:49:05 +08:00
parent ca07078415
commit 05fb848fc5
9 changed files with 80 additions and 29 deletions
+6 -1
View File
@@ -4,7 +4,7 @@ namespace App\Models;
class Exam extends NexusModel
{
protected $fillable = ['name', 'description', 'begin', 'end', 'status', 'is_discovered', 'filters', 'indexes'];
protected $fillable = ['name', 'description', 'begin', 'end', 'duration', 'status', 'is_discovered', 'filters', 'indexes'];
public $timestamps = true;
@@ -59,4 +59,9 @@ class Exam extends NexusModel
return self::$discovers[$this->is_discovered]['text'] ?? '';
}
public function getDurationTextAttribute(): string
{
return $this->duration . ' Days';
}
}