feat : 내 정보 조회 API 추가
This commit is contained in:
17
app/Models/MemberCompany.php
Normal file
17
app/Models/MemberCompany.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
||||
class MemberCompany extends Model
|
||||
{
|
||||
protected $table = 'member_company';
|
||||
protected $primaryKey = 'mc_num'; // 기본 키 변경
|
||||
|
||||
public function members()
|
||||
{
|
||||
return $this->hasMany(Member::class, 'tn_num', 'mc_num');
|
||||
// member_company.mc_num = members.tn_num
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user