1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Models;
- # use Illuminate\Database\Eloquent\Model;
- class Note extends Model
- {
- protected $table = "note";
- public function client()
- {
- return $this->hasOne(Client::class, 'id', 'client_id');
- }
- public function hcpPro()
- {
- return $this->hasOne(Pro::class, 'id', 'hcp_pro_id');
- }
- public function allyPro()
- {
- return $this->hasOne(Pro::class, 'id', 'ally_pro_id');
- }
- public function bills()
- {
- return $this->hasMany(Bill::class, 'note_id', 'id');
- }
- public function sections()
- {
- return $this->hasMany(Section::class, 'note_id', 'id');
- }
- }
|