mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
move cleanup: seed bonus and seeding leeching time to job
This commit is contained in:
@@ -3,11 +3,14 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
class Plugin extends NexusModel
|
||||
{
|
||||
protected $fillable = ['display_name', 'package_name', 'remote_url', 'installed_version', 'status', 'description', 'status_result'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
const STATUS_NOT_INSTALLED = -1;
|
||||
const STATUS_NORMAL = 0;
|
||||
|
||||
@@ -23,6 +26,23 @@ class Plugin extends NexusModel
|
||||
const STATUS_DELETING = 102;
|
||||
const STATUS_DELETE_FAILED = 103;
|
||||
|
||||
public static array $showInstallBtnStatus = [
|
||||
self::STATUS_NOT_INSTALLED,
|
||||
self::STATUS_INSTALL_FAILED,
|
||||
];
|
||||
|
||||
public static array $showUpdateBtnStatus = [
|
||||
self::STATUS_NORMAL,
|
||||
self::STATUS_UPDATE_FAILED,
|
||||
self::STATUS_DELETE_FAILED,
|
||||
];
|
||||
|
||||
public static array $showDeleteBtnStatus = [
|
||||
self::STATUS_NORMAL,
|
||||
self::STATUS_UPDATE_FAILED,
|
||||
self::STATUS_DELETE_FAILED,
|
||||
];
|
||||
|
||||
public function statusText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
|
||||
Reference in New Issue
Block a user