Note.php 425 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class Note extends Model
  5. {
  6. protected $table = "note";
  7. public function hcpPro(){
  8. return $this->hasOne(Pro::class,'id', 'hcp_pro_id');
  9. }
  10. public function allyPro(){
  11. return $this->hasOne(Pro::class,'id', 'ally_pro_id');
  12. }
  13. public function bills(){
  14. return $this->hasMany(Bill::class, 'note_id', 'id');
  15. }
  16. }