hot&classic do not resize cover

This commit is contained in:
xiaomlove
2022-05-04 15:20:15 +08:00
parent 130051d648
commit 3990c74038
4 changed files with 8 additions and 45 deletions

View File

@@ -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 序列化准备日期。
*