Files
CKB/app/Models/Transaction.php
2025-05-27 19:09:17 +07:00

26 lines
638 B
PHP

<?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');
}
}