|
|
|
|
@ -21,7 +21,9 @@ class Orders extends SoftDeletesModel
|
|
|
|
|
const TEXT_ONGOING = "进行中";
|
|
|
|
|
const TEXT_FINISHED = "已完成";
|
|
|
|
|
|
|
|
|
|
public function getStatusLabelAttribute($pure_text = false)
|
|
|
|
|
protected $appends = ["status_name"];
|
|
|
|
|
|
|
|
|
|
public function getStatusLabelAttribute($pure_text = true)
|
|
|
|
|
{
|
|
|
|
|
switch ($this->status) {
|
|
|
|
|
case self::STATUS_UNCONFIRMED:
|
|
|
|
|
@ -45,6 +47,10 @@ class Orders extends SoftDeletesModel
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getStatusNameAttribute() {
|
|
|
|
|
return $this->getStatusLabelAttribute();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected static function booted()
|
|
|
|
|
{
|
|
|
|
|
static::addGlobalScope(new AdminProjectScope());
|
|
|
|
|
|