mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
hot&classic do not resize cover
This commit is contained in:
@@ -69,7 +69,7 @@ class User extends Authenticatable
|
||||
self::DONATE_NO => ['text' => 'No'],
|
||||
];
|
||||
|
||||
public static $cardTitles = [
|
||||
public static array $cardTitles = [
|
||||
'uploaded_human' => '上传量',
|
||||
'downloaded_human' => '下载量',
|
||||
'share_ratio' => '分享率',
|
||||
@@ -79,32 +79,6 @@ class User extends Authenticatable
|
||||
'invites' => '邀请',
|
||||
];
|
||||
|
||||
public function mappableAs(): array
|
||||
{
|
||||
return [
|
||||
'id' => 'long',
|
||||
'username' => [
|
||||
'type' => 'text',
|
||||
'analyzer' => 'ik_max_word',
|
||||
],
|
||||
'email' => [
|
||||
'type' => 'text',
|
||||
'analyzer' => 'ik_max_word',
|
||||
],
|
||||
'added' => 'date',
|
||||
];
|
||||
}
|
||||
|
||||
public function toSearchableArray()
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'username' => $this->username,
|
||||
'email' => $this->email,
|
||||
'added' => $this->added,
|
||||
];
|
||||
}
|
||||
|
||||
public function getClassTextAttribute(): string
|
||||
{
|
||||
if (!isset(self::$classes[$this->class]['text'])) {
|
||||
@@ -118,20 +92,6 @@ class User extends Authenticatable
|
||||
return $classText;
|
||||
}
|
||||
|
||||
public function getDonateStatusAttribute()
|
||||
{
|
||||
if (empty($this->donoruntil) || $this->donoruntil == '0000-00-00 00:00:00') {
|
||||
return self::DONATE_NO;
|
||||
}
|
||||
return self::DONATE_YES;
|
||||
}
|
||||
|
||||
public function getSeedPointsAttribute(): string
|
||||
{
|
||||
return $this->seed_points ?? 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 为数组 / JSON 序列化准备日期。
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user