| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- /**
- * @property int $id
- * @property int $irrecusable_proposal_id
- * @property int $product_id
- * @property int $quantity
- * @property float $price
- * @property-read \App\Models\IrrecusableProposal $irrecusableProposal
- * @property-read \App\Models\Product $product
- */
- class IrrecusableProposalProduct extends Model
- {
- use HasFactory;
- protected $table = 'irrecusable_proposal_products';
- protected $guarded = ['id'];
- protected $casts = [
- 'quantity' => 'integer',
- 'price' => 'float',
- ];
- public function irrecusableProposal(): BelongsTo
- {
- return $this->belongsTo(IrrecusableProposal::class);
- }
- public function product(): BelongsTo
- {
- return $this->belongsTo(Product::class);
- }
- }
|