love_php/app/Models/Server/MerchantMembers.php

32 lines
701 B
PHP
Raw Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Models\Server;
use Illuminate\Database\Eloquent\Model;
use App\Http\Response\ResponseJson;
use Illuminate\Database\Eloquent\SoftDeletes;
class MerchantMembers extends Model
{
use ResponseJson;
use SoftDeletes;
//增加收益记录
protected $fillable = ['m_id','name','designation','avatar','introduction'];
public function merchant()
{
return $this->belongsTo(MerchantAccount::class, 'id', 'mch_id');
}
public function admin()
{
return $this->hasOne(MerchantAdmins::class, 'id', 'admin_id');
}
public function adminLink(){
return $this->hasOne(MerchantAdminLinks::class, 'admin_id', 'admin_id');
}
}