24 lines
508 B
PHP
24 lines
508 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class DeliveryRecord extends Model
|
|
{
|
|
protected $table = 'delivery_records';
|
|
|
|
protected $fillable = [
|
|
'order_id', 'tracking_no', 'logistics_company',
|
|
'sync_status', 'sync_error', 'sync_response', 'sync_time'
|
|
];
|
|
|
|
protected $casts = [
|
|
'sync_response' => 'array',
|
|
'sync_time' => 'datetime',
|
|
];
|
|
|
|
public function order()
|
|
{
|
|
return $this->belongsTo(ErpOrder::class);
|
|
}
|
|
} |