File: /var/www/wsklad/app/Storedocumentline.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Storedocumentline extends Model
{
protected $fillable = [
'storedocument_id',
'PORNOM',
'NAME',
'DELIVNO',
'MERKADOST',
'MERKASKLAD',
'MATQDOST',
'EDDOSTCENA',
'MATQSKLAD',
'EDOTCENA',
'EDOTSTOINOST',
'EDPRODCENA',
'EDPRODSTOINOST',
'EDOTCENAVAL',
'EDOTSTOINOSTVAL',
'CURRENCY',
'PRODSTOINOSTLEVA',
'F_VERSION',
'CODE',
'PARTN',
'DATEPART',
'RAZRN',
'EXPDATE',
'SKLAD_GP',
'CODE_GP',
'PARTN_GP',
'processed'
];
protected $table = 'store_document_lines';
public function storeDocument()
{
return $this->belongsTo('App\Storedocument', 'storedocument_id', 'id');
}
public function recipeLines()
{
return $this->hasMany('App\Recipe', 'CODE_GP', 'CODE');
}
public function replaceReplaceLines()
{
return $this->hasMany('App\Recipereplace', 'CODE_GP', 'CODE');
}
public function materials()
{
return $this->hasMany('App\Linematerial', 'lineid', 'id');
}
}