mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
admin add claim
This commit is contained in:
@@ -35,6 +35,10 @@ class Snatch extends NexusModel
|
||||
|
||||
const FINISHED_NO = 'no';
|
||||
|
||||
/**
|
||||
* @deprecated Use uploadedText instead
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function uploadText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
@@ -42,6 +46,10 @@ class Snatch extends NexusModel
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use downloadedText instead
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function downloadText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
@@ -49,6 +57,20 @@ class Snatch extends NexusModel
|
||||
);
|
||||
}
|
||||
|
||||
protected function uploadedText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
get: fn($value, $attributes) => sprintf('%s@%s', mksize($attributes['uploaded']), $this->getUploadSpeed())
|
||||
);
|
||||
}
|
||||
|
||||
protected function downloadedText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
get: fn($value, $attributes) => sprintf('%s@%s', mksize($attributes['downloaded']), $this->getDownloadSpeed())
|
||||
);
|
||||
}
|
||||
|
||||
protected function shareRatio(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
|
||||
Reference in New Issue
Block a user