invoiceninja/app/Models/InvoiceItem.php
Hillel Coren c7c253fbd8 Merge branch 'release-2.6.9'
Conflicts:
	app/Http/routes.php
	app/Ninja/PaymentDrivers/BasePaymentDriver.php
	composer.lock
	resources/lang/en/texts.php
	resources/views/reports/chart_builder.blade.php
2016-08-14 09:07:44 +03:00

75 lines
1.3 KiB
PHP

<?php namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class InvoiceItem
*/
class InvoiceItem extends EntityModel
{
/**
* @return mixed
*/
public function getEntityType()
{
return ENTITY_INVOICE_ITEM;
}
use SoftDeletes;
/**
* @var array
*/
protected $dates = ['deleted_at'];
/**
* @return mixed
*/
public function getEntityType()
{
return ENTITY_INVOICE_ITEM;
}
/**
* @var array
*/
protected $fillable = [
'tax_name1',
'tax_rate1',
'tax_name2',
'tax_rate2',
];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function invoice()
{
return $this->belongsTo('App\Models\Invoice');
}
/**
* @return mixed
*/
public function user()
{
return $this->belongsTo('App\Models\User')->withTrashed();
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function product()
{
return $this->belongsTo('App\Models\Product');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function account()
{
return $this->belongsTo('App\Models\Account');
}
}