|
@@ -21,7 +21,7 @@ class Client extends Model
|
|
|
public function cm(){
|
|
|
return $this->hasOne(Pro::class, 'id', 'cm_pro_id');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public function prosInMeetingWith() {
|
|
|
return Pro::where('in_meeting_with_client_id', $this->id)->get();
|
|
|
}
|
|
@@ -30,4 +30,8 @@ class Client extends Model
|
|
|
return $this->hasMany(Note::class, 'client_id', 'id')->orderBy('id', 'desc');
|
|
|
}
|
|
|
|
|
|
+ public function duplicateOf(){
|
|
|
+ return $this->hasOne(Client::class, 'id', 'duplicate_of_client_id');
|
|
|
+ }
|
|
|
+
|
|
|
}
|