OrderDetail.php 590 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class OrderDetail extends Model
  5. {
  6. public function order()
  7. {
  8. return $this->belongsTo(Order::class);
  9. }
  10. public function product()
  11. {
  12. return $this->belongsTo(Product::class);
  13. }
  14. public function pickup_point()
  15. {
  16. return $this->belongsTo(PickupPoint::class);
  17. }
  18. public function refund_request()
  19. {
  20. return $this->hasOne(RefundRequest::class);
  21. }
  22. public function affiliate_log()
  23. {
  24. return $this->hasMany(AffiliateLog::class);
  25. }
  26. }