| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- class ReclamationSparePart extends Model
- {
- protected $table = 'reclamation_spare_part';
- protected $fillable = [
- 'reclamation_id',
- 'spare_part_id',
- 'quantity',
- 'with_documents',
- 'status',
- 'reserved_qty',
- 'issued_qty',
- ];
- protected $casts = [
- 'quantity' => 'integer',
- 'with_documents' => 'boolean',
- 'reserved_qty' => 'integer',
- 'issued_qty' => 'integer',
- ];
- public function reclamation(): BelongsTo
- {
- return $this->belongsTo(Reclamation::class);
- }
- public function sparePart(): BelongsTo
- {
- return $this->belongsTo(SparePart::class);
- }
- }
|