Yin Bin há 4 meses atrás
pai
commit
9ac00329a7
2 ficheiros alterados com 21 adições e 3 exclusões
  1. 19 1
      app/Models/CoachUser.php
  2. 2 2
      app/Models/MemberUser.php

+ 19 - 1
app/Models/CoachUser.php

@@ -126,7 +126,7 @@ class CoachUser extends Model
      */
     public function wallet()
     {
-        return $this->MORPH_ONE('App\Models\Wallet', 'undefined');
+        return $this->morphOne('App\Models\Wallet', 'undefined');
     }
 
     /**
@@ -164,4 +164,22 @@ class CoachUser extends Model
     {
         return $this->hasMany('App\Models\CoachProject', 'coach_id', 'id');
     }
+
+    /**
+     * @Author FelixYin
+     * @description 技师关联资质记录
+     */
+    public function qualRecords()
+    {
+        return $this->hasMany('App\Models\CoachQualRecord', 'coach_id', 'id');
+    }
+
+    /**
+     * @Author FelixYin
+     * @description 技师关联实名认证记录
+     */
+    public function realAuthRecords()
+    {
+        return $this->hasMany('App\Models\CoachRealAuthRecord', 'coach_id', 'id');
+    }
 }

+ 2 - 2
app/Models/MemberUser.php

@@ -96,7 +96,7 @@ class MemberUser extends Authenticatable
      */
     public function wallet()
     {
-        return $this->MORPH_ONE('App\Models\Wallet', 'undefined', 'id');
+        return $this->morphOne('App\Models\Wallet', 'undefined', 'id');
     }
 
     /**
@@ -141,6 +141,6 @@ class MemberUser extends Authenticatable
      */
     public function teams()
     {
-        return $this->MORPH_MANY('App\Models\MarketDistTeam', 'undefined', 'id');
+        return $this->morphMany('App\Models\MarketDistTeam', 'undefined', 'id');
     }
 }