'boolean', ]; /** * 获取座驾对应的所有购买记录。 */ public function purchases(): HasMany { return $this->hasMany(UserRidePurchase::class); } /** * 获取座驾全屏特效 key。 */ public function rideKey(): string { return $this->effect_key; } /** * 获取所有上架座驾。 * * @return Collection */ public static function active(): Collection { return static::query() ->where('is_active', true) ->orderBy('sort_order') ->orderBy('id') ->get(); } }