| 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 $pavao_proposal_unit_id
- * @property int $product_id
- * @property int $quantity
- * @property float $price
- * @property-read \App\Models\PavaoProposalUnit $pavaoProposalUnit
- * @property-read \App\Models\Product $product
- */
- class PavaoProposalUnitProduct extends Model
- {
- use HasFactory;
- protected $table = 'pavao_proposal_unit_products';
- protected $guarded = ['id'];
- protected $casts = [
- 'quantity' => 'integer',
- 'price' => 'float',
- ];
- public function pavaoProposalUnit(): BelongsTo
- {
- return $this->belongsTo(PavaoProposalUnit::class);
- }
- public function product(): BelongsTo
- {
- return $this->belongsTo(Product::class);
- }
- }
|