50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Product extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function Inventories()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\Inventory');
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function Prices()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\ProductPrice');
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function ProductAttributes()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\ProductAttribute');
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function Categories()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\CategoryProduct');
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function InvoiceItems()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\InvoiceItem');
|
|
}
|
|
} |