OwnerFeeLogistic.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. class OwnerFeeLogistic extends Model
  7. {
  8. use ModelLogChanging;
  9. public $timestamps=false;
  10. protected $fillable = [
  11. "province_id",
  12. "owner_id",
  13. "city_id",
  14. "logistic_id",
  15. "order_number",
  16. "recipient_name",
  17. "recipient_phone",
  18. "quantity",
  19. "unit_id",
  20. "interval",
  21. "price",
  22. "delivery_fee",
  23. "pick_fee",
  24. "fuel_fee",
  25. "info_fee",
  26. "other_fee",
  27. "initial_fee",
  28. "initial_amount",
  29. "total_fee",
  30. "tax_rate",
  31. "remark",
  32. "created_at",
  33. ];
  34. public function province(): BelongsTo
  35. {
  36. return $this->belongsTo(Province::class);
  37. }
  38. public function city(): BelongsTo
  39. {
  40. return $this->belongsTo(City::class);
  41. }
  42. public function owner(): BelongsTo
  43. {
  44. return $this->belongsTo(Owner::class);
  45. }
  46. public function logistic(): BelongsTo
  47. {
  48. return $this->belongsTo(Logistic::class);
  49. }
  50. public function unit(): BelongsTo
  51. {
  52. return $this->belongsTo(Unit::class);
  53. }
  54. }