25 lines
629 B
PHP
25 lines
629 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
||
|
class DocumentProduct extends Model
|
||
|
{
|
||
|
protected $table = 'document_product';
|
||
|
|
||
|
use HasFactory;
|
||
|
|
||
|
protected $fillable = ['product_id', 'document_id', 'quantity', 'past_quantity'];
|
||
|
|
||
|
public function product(): BelongsTo
|
||
|
{
|
||
|
return $this->belongsTo(Product::class);
|
||
|
}
|
||
|
}
|