mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
exam user show is_done
This commit is contained in:
@@ -19,6 +19,11 @@ class ExamUser extends NexusModel
|
||||
const IS_DONE_YES = 1;
|
||||
const IS_DONE_NO = 0;
|
||||
|
||||
public static $isDoneInfo = [
|
||||
self::IS_DONE_YES => ['text' => 'Yes'],
|
||||
self::IS_DONE_NO => ['text' => 'No'],
|
||||
];
|
||||
|
||||
|
||||
protected $casts = [
|
||||
'progress' => 'json'
|
||||
@@ -29,6 +34,11 @@ class ExamUser extends NexusModel
|
||||
return self::$status[$this->status]['text'] ?? '';
|
||||
}
|
||||
|
||||
public function getIsDoneTextAttribute(): string
|
||||
{
|
||||
return self::$isDoneInfo[$this->is_done]['text'] ?? '';
|
||||
}
|
||||
|
||||
public function getBeginAttribute()
|
||||
{
|
||||
$begin = $this->getRawOriginal('begin');
|
||||
|
||||
Reference in New Issue
Block a user