initial commit
This commit is contained in:
38
app/Models/Item.php
Normal file
38
app/Models/Item.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'plans_id',
|
||||
'status',
|
||||
'cart_id',
|
||||
'labkit_delivery_status',
|
||||
'quantity',
|
||||
'note',
|
||||
'short_description'
|
||||
];
|
||||
|
||||
public function cart()
|
||||
{
|
||||
return $this->belongsTo(Cart::class);
|
||||
}
|
||||
public function plansV1()
|
||||
{
|
||||
return $this->belongsTo(PlanV1::class, 'plans_id');
|
||||
}
|
||||
public function itemHistories()
|
||||
{
|
||||
return $this->hasMany(ItemHistory::class, 'item_id');
|
||||
}
|
||||
public function labkitOrderItems()
|
||||
{
|
||||
return $this->hasMany(LabkitOrderItem::class);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user