'绑币', 0 => '平台币', 1 => '支付宝', 2 => '微信', 3 => '微信APP', 9 => '双乾支付', 15 => '双乾支付-快捷', 17 => '易宝支付' ]; public static $payStatusList = [ self::STATUS_FAILED => '失败', self::STATUS_SUCCESS => '成功', ]; public function getPayWayTextAttribute() { return self::$payWays[$this->pay_way] ?? '未知'; } public function getDeviceTypeNameAttribute() { return DeviceType::getDeviceTypeText($this->sdk_version); } public function getPayStatusTextAttribute() { return self::$payStatusList[$this->pay_status] ?? '未知'; } public function promote() { return $this->belongsTo(Promote::class, 'promote_id', 'id'); } public function isSuccess() { return $this->pay_status === self::STATUS_SUCCESS; } }