mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-04 19:49:16 +00:00
29 lines
621 B
PHP
29 lines
621 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* 营销
|
|
*/
|
|
class Marketing extends Model
|
|
{
|
|
protected $table = 'marketing';
|
|
|
|
protected $guarded = [];
|
|
|
|
protected function statusLabel(): Attribute
|
|
{
|
|
return Attribute::make(
|
|
get: fn () => match ($this->status) {
|
|
-1 => trans('common.failed'),
|
|
0 => trans('common.status.pending_dispatch'),
|
|
1 => trans('common.success'),
|
|
default => trans('common.status.unknown'),
|
|
},
|
|
);
|
|
}
|
|
}
|