move cleanup: seed bonus and seeding leeching time to job

This commit is contained in:
xiaomlove
2022-10-28 14:17:10 +08:00
parent 410aed39cf
commit a61d1b0900
19 changed files with 404 additions and 110 deletions

View File

@@ -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(