AccountingItem.php 769 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class AccountingItem extends Model
  5. {
  6. protected $table = 'accounting_item';
  7. public function client() {
  8. return $this->hasOne(Client::class, 'id', 'client_id');
  9. }
  10. public function pro() {
  11. return $this->hasOne(Pro::class, 'id', 'pro_id');
  12. }
  13. public function note() {
  14. return $this->hasOne(Note::class, 'id', 'note_id');
  15. }
  16. public function careMonth() {
  17. return $this->hasOne(CareMonth::class, 'id', 'care_month_id');
  18. }
  19. public function bill() {
  20. return $this->hasOne(Bill::class, 'id', 'bill_id');
  21. }
  22. public function supplyOrder() {
  23. return $this->hasOne(SupplyOrder::class, 'id', 'supply_order_id');
  24. }
  25. }