Bill.php 715 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class Bill extends Model
  5. {
  6. protected $table = 'bill';
  7. public function careMonth() {
  8. return $this->belongsTo(CareMonth::class);
  9. }
  10. public function note() {
  11. return $this->belongsTo(Note::class);
  12. }
  13. public function client()
  14. {
  15. return $this->hasOne(Client::class, 'id', 'client_id');
  16. }
  17. public function hcp() {
  18. return $this->hasOne(Pro::class, 'id', 'hcp_pro_id');
  19. }
  20. public function ally() {
  21. return $this->hasOne(Pro::class, 'id', 'na_pro_id');
  22. }
  23. public function genericPro() {
  24. return $this->hasOne(Pro::class, 'id', 'generic_pro_id');
  25. }
  26. }