Files
productalert/app/Models/ShopeeSellerScrape.php
2023-10-01 04:29:03 +08:00

56 lines
1.2 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class ShopeeSellerScrape
*
* @property int $id
* @property int|null $category_id
* @property string $seller
* @property string $country_iso
* @property int $epoch
* @property string $filename
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Category|null $category
* @property Collection|ShopeeSellerScrapedImage[] $shopee_seller_scraped_images
*/
class ShopeeSellerScrape extends Model
{
protected $table = 'shopee_seller_scrapes';
protected $casts = [
'category_id' => 'int',
'epoch' => 'int',
'last_ai_written_at' => 'datetime',
];
protected $fillable = [
'category_id',
'seller',
'country_iso',
'epoch',
'filename',
'last_ai_written_at',
];
public function category()
{
return $this->belongsTo(Category::class);
}
public function shopee_seller_scraped_images()
{
return $this->hasMany(ShopeeSellerScrapedImage::class);
}
}