hasOne(Anchor::class,'id','anchor_id'); } public function banners(){ return $this->hasOne(LiveBanner::class,'class_id','id'); } public function member(){ return $this->hasMany(TouristOrder::class,'type_id','id'); } public function merchant(){ return $this->hasMany(MerchantAccount::class,'id','merchant_id'); } public function getPicAttribute($value) { if ($this->merchant_id == 491) { if ($value) { if (!strpos('local-pictures', $value) && !strpos($value, 'x-oss-process') && strstr($value, 'ufutx')) { return $value . Config('image.watermark'); } else { return $value; } } else { return $value; } }else{ return $value; } } public function merchantService(){ return $this->hasMany(MerchantService::class,'merchant_id','merchant_id'); } public function getFlowAttribute($value) { return json_decode($value, true); } public function getReportAttribute($value) { return json_decode($value, true); } public function virtualMembers() { return $this->hasMany(CommunityActivityMember::class, 'activity_id', 'id'); } }