belongsTo(App::class, 'app_id', 'app_id'); } public static $shortStatusAndStatusMap = [ '0' => self::STATUS_PROCESS, '1' => self::STATUS_SUCCESS, '-1' => self::STATUS_FAILED, '2' => self::STATUS_REFUND, ]; public static function getStatusByShortStatus($shortStatus) { return self::$shortStatusAndStatusMap[$shortStatus] ?: null; } }