Add price and product models
This commit is contained in:
29
src/Models/Product.php
Normal file
29
src/Models/Product.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Krzysiej\RyobiCrawler\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* @property integer $skuID
|
||||
* @property integer $agilityID
|
||||
* @property string $name
|
||||
* @property integer $availableQuantity
|
||||
* @property integer $stock
|
||||
* @property string[] $categories
|
||||
* @property string $image
|
||||
* @property string $subTitle
|
||||
* @property string $variantCode
|
||||
* @property string $modelCode
|
||||
* @property string $url
|
||||
*/
|
||||
class Product extends Model
|
||||
{
|
||||
public $timestamps = true;
|
||||
public $fillable = ['skuID'];
|
||||
public function price(): HasMany
|
||||
{
|
||||
return $this->hasMany(Price::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user