SupplyOrder.php 739 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class SupplyOrder extends Model
  5. {
  6. protected $table = 'supply_order';
  7. public function product()
  8. {
  9. return $this->hasOne(Product::class, 'id', 'product_id');
  10. }
  11. public function shipment()
  12. {
  13. return $this->hasOne(Shipment::class, 'id', 'shipment_id');
  14. }
  15. public function signedPro() {
  16. return $this->hasOne(Pro::class, 'id', 'signed_by_pro_id');
  17. }
  18. public function waiverPro() {
  19. return $this->hasOne(Pro::class, 'id', 'client_signature_waived_by_pro_id');
  20. }
  21. public function clearedForShipmentPro() {
  22. return $this->hasOne(Pro::class, 'id', 'cleared_for_shipment_by_pro_id');
  23. }
  24. }