mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
add bonus exchange downloaded
This commit is contained in:
@@ -25,6 +25,7 @@ class BonusLogs extends NexusModel
|
||||
const BUSINESS_TYPE_NO_AD = 11;
|
||||
const BUSINESS_TYPE_GIFT_TO_LOW_SHARE_RATIO = 12;
|
||||
const BUSINESS_TYPE_LUCKY_DRAW = 13;
|
||||
const BUSINESS_TYPE_EXCHANGE_DOWNLOAD = 14;
|
||||
|
||||
public static array $businessTypes = [
|
||||
self::BUSINESS_TYPE_CANCEL_HIT_AND_RUN => ['text' => 'Cancel H&R'],
|
||||
@@ -40,6 +41,7 @@ class BonusLogs extends NexusModel
|
||||
self::BUSINESS_TYPE_NO_AD => ['text' => 'No ad'],
|
||||
self::BUSINESS_TYPE_GIFT_TO_LOW_SHARE_RATIO => ['text' => 'Gift to low share ratio'],
|
||||
self::BUSINESS_TYPE_LUCKY_DRAW => ['text' => 'Lucky draw'],
|
||||
self::BUSINESS_TYPE_EXCHANGE_DOWNLOAD => ['text' => 'Exchange download'],
|
||||
];
|
||||
|
||||
public static function getBonusForCancelHitAndRun()
|
||||
|
||||
32
app/Models/Plugin.php
Normal file
32
app/Models/Plugin.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
|
||||
class Plugin extends NexusModel
|
||||
{
|
||||
protected $fillable = ['display_name', 'package_name', 'remote_url', 'installed_version', 'status', 'description', 'status_result'];
|
||||
|
||||
const STATUS_NOT_INSTALLED = -1;
|
||||
const STATUS_NORMAL = 0;
|
||||
|
||||
const STATUS_PRE_INSTALL = 1;
|
||||
const STATUS_INSTALLING = 2;
|
||||
const STATUS_INSTALL_FAILED = 3;
|
||||
|
||||
const STATUS_PRE_UPDATE = 11;
|
||||
const STATUS_UPDATING = 12;
|
||||
const STATUS_UPDATE_FAILED = 13;
|
||||
|
||||
const STATUS_PRE_DELETE = 101;
|
||||
const STATUS_DELETING = 102;
|
||||
const STATUS_DELETE_FAILED = 103;
|
||||
|
||||
public function statusText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
get: fn($value, $attributes) => __('plugin.status.' . $attributes['status'])
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user