<?php namespace App\Model; use Illuminate\Database\Eloquent\Model; class SkuUploadLogModel extends Model { protected $table='sku_upload_log'; protected $primaryKey = 'id'; protected $connection = 'spu'; public $timestamps = false; const STATUS_HANDLED = 3; public function upload_items() { return $this->hasMany(SkuUploadItem::class, 'log_id', 'id'); } }