File: /var/www/wsklad/app/SyncWithAjurStatus.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SyncWithAjurStatus extends Model
{
use HasFactory;
protected $table = 'sync_with_ajur_status';
protected $fillable = [
'module',
'timestamp',
'saleId',
'status',
'description',
'distributorCode',
];
public $timestamps = true;
public function distributorDetail()
{
return $this->belongsTo(Distributordetail::class, 'distributorCode', 'F_KONTRAGENT');
}
public function sale()
{
return $this->hasOne(MobileSaleDocument::class, 'id', 'saleId');
}
}