'json', 'gift' => 'json' ]; public static $statusMap = [ self::STATUS_UNPAID => '待付款', self::STATUS_SUCCESS => '已付款', self::STATUS_PROCESSING => '处理中' ]; public function user() { return $this->belongsTo(User::class, 'user_id'); } public function vip() { return $this->belongsTo(Vip::class, 'vip_id'); } public function pay() { return $this->morphOne(PayLog::class, 'payable'); } }