Bill.php 510 B

123456789101112131415161718192021222324252627
  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. }