erp-backend/app/Models/PrintLog.php
2026-04-01 17:07:04 +08:00

26 lines
491 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class PrintLog extends Model
{
protected $fillable = [
'order_id', 'batch_no', 'operator_id', 'print_time',
'print_type', 'reason'
];
protected $casts = [
'print_time' => 'datetime',
];
public function order()
{
return $this->belongsTo(Order::class);
}
public function operator()
{
return $this->belongsTo(User::class, 'operator_id');
}
}