| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- class SparePartOrderShipment extends Model
- {
- protected $fillable = [
- 'spare_part_order_id',
- 'quantity',
- 'note',
- 'reclamation_id',
- 'user_id',
- 'is_automatic',
- ];
- protected $casts = [
- 'is_automatic' => 'boolean',
- 'quantity' => 'integer',
- ];
- public function sparePartOrder(): BelongsTo
- {
- return $this->belongsTo(SparePartOrder::class);
- }
- public function reclamation(): BelongsTo
- {
- return $this->belongsTo(Reclamation::class);
- }
- public function user(): BelongsTo
- {
- return $this->belongsTo(User::class);
- }
- }
|