26 lines
638 B
PHP
Executable File
26 lines
638 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Transaction extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
protected $fillable = [
|
|
"user_id", "user_sa_id", "work_id", "form", "spk", "police_number", "warranty", "date", "qty", "status", "dealer_id"
|
|
];
|
|
|
|
/**
|
|
* Get the work associated with the Transaction
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
|
*/
|
|
public function work()
|
|
{
|
|
return $this->hasOne(Work::class, 'id', 'work_id');
|
|
}
|
|
}
|