26 lines
491 B
PHP
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');
|
|
}
|
|
} |