|
|
@@ -2,9 +2,6 @@
|
|
|
|
|
|
namespace App\Module\Farm\Dtos;
|
|
|
|
|
|
-use App\Module\Farm\Models\FarmUser;
|
|
|
-use App\Module\User\Models\User;
|
|
|
-
|
|
|
/**
|
|
|
* 房屋排行榜项目数据传输对象
|
|
|
*/
|
|
|
@@ -22,6 +19,12 @@ class HouseRankItemDto
|
|
|
*/
|
|
|
public int $level = 0;
|
|
|
|
|
|
+ /**
|
|
|
+ * 财富值(钻石余额)
|
|
|
+ * @var int
|
|
|
+ */
|
|
|
+ public int $wealth = 0;
|
|
|
+
|
|
|
/**
|
|
|
* 用户ID
|
|
|
* @var int
|
|
|
@@ -45,14 +48,16 @@ class HouseRankItemDto
|
|
|
*
|
|
|
* @param int $rank 排名
|
|
|
* @param int $level 房屋等级
|
|
|
+ * @param int $wealth 财富值
|
|
|
* @param int $userId 用户ID
|
|
|
* @param string $nickname 用户昵称
|
|
|
* @param int $reason 赛季
|
|
|
*/
|
|
|
- public function __construct(int $rank = 0, int $level = 0, int $userId = 0, string $nickname = '', int $reason = 1)
|
|
|
+ public function __construct(int $rank = 0, int $level = 0, int $wealth = 0, int $userId = 0, string $nickname = '', int $reason = 1)
|
|
|
{
|
|
|
$this->rank = $rank;
|
|
|
$this->level = $level;
|
|
|
+ $this->wealth = $wealth;
|
|
|
$this->userId = $userId;
|
|
|
$this->nickname = $nickname;
|
|
|
$this->reason = $reason;
|
|
|
@@ -70,6 +75,7 @@ class HouseRankItemDto
|
|
|
return new static(
|
|
|
rank: $rank,
|
|
|
level: $data['house_level'] ?? 0,
|
|
|
+ wealth: $data['balance'] ?? 0,
|
|
|
userId: $data['user_id'] ?? 0,
|
|
|
nickname: $data['nickname'] ?? '',
|
|
|
reason: 1
|