28 lines
535 B
PHP
Executable File
28 lines
535 B
PHP
Executable File
<?php
|
|
/**
|
|
* @createtime 2023/4/20
|
|
* @author wild
|
|
* @copyright PhpStorm
|
|
*/
|
|
|
|
|
|
namespace App\Model\Seller;
|
|
|
|
use App\Model\BaseModel;
|
|
|
|
class ShopCooperate extends BaseModel
|
|
{
|
|
public function shop() {
|
|
return $this->belongsTo(Shop::class, 'shop_id', 'id');
|
|
}
|
|
|
|
public function cooperate() {
|
|
return $this->belongsTo(Shop::class, 'cooperate_id', 'id');
|
|
}
|
|
|
|
public function shopCooperateLottery() {
|
|
return $this->hasMany(ShopCooperateLottery::class, 'shop_cooperate_id', 'id');
|
|
}
|
|
|
|
}
|