You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
630 B
28 lines
630 B
<?php
|
|
|
|
namespace App\Domains\Billing\Models;
|
|
|
|
use Database\Factories\Billing\ProductFactory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Attributes\UseFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
|
|
#[Fillable([
|
|
'code',
|
|
'name',
|
|
'pricing_type',
|
|
'pricing_id',
|
|
'chart_of_account_id'
|
|
])]
|
|
#[UseFactory(ProductFactory::class)]
|
|
class Product extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public function pricing(): MorphTo
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
}
|
|
|