Files
YNWA Fawzy 8a290a0d09 - Added Argos UK to the list of stores
- Added groups, where you can set bunch of items with identified unique keys to get the lowest price on group of products. ( think of it like building your own PC, you add multiple CPUs, and GPUs and the program will notify you when the combination reaches a desired price)
- Added 2FA Support to the system  (Optional)
- Make Sidebar collapsable
- Fix name is too short which results to not be saved
- Fix a bug where product can be duplicated from amazon stores
2024-01-16 15:53:45 +04:00

30 lines
579 B
PHP

<?php
namespace App\Models;
use App\Casts\Money;
use App\Enums\StatusEnum;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Group extends Model
{
use HasFactory;
protected $guarded=["id"];
protected $casts=[
"notify_price"=>Money::class,
"status"=>StatusEnum::class
];
public function currency (){
return $this->belongsTo(Currency::class);
}
public function products(){
return $this->belongsToMany(Product::class)->withTimestamps()->withPivot("key");
}
}