12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Models;
- # use Illuminate\Database\Eloquent\Model;
- class Bill extends Model
- {
- protected $table = 'bill';
- public function careMonth() {
- return $this->belongsTo(CareMonth::class);
- }
- public function note() {
- return $this->belongsTo(Note::class);
- }
- public function client()
- {
- return $this->hasOne(Client::class, 'id', 'client_id');
- }
- public function hcp() {
- return $this->hasOne(Pro::class, 'id', 'hcp_pro_id');
- }
- public function ally() {
- return $this->hasOne(Pro::class, 'id', 'na_pro_id');
- }
- public function genericPro() {
- return $this->hasOne(Pro::class, 'id', 'generic_pro_id');
- }
- public function hcpCompanyPro() {
- return $this->hasOne(CompanyPro::class, 'id', 'hcp_company_pro_id');
- }
- public function genericCompanyPro() {
- return $this->hasOne(CompanyPro::class, 'id', 'generic_company_pro_id');
- }
- }
|