<?php namespace App\Model; use App\Http\Services\AdminUserService; use App\Http\Services\DepartmentService; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Redis; class ChainModel extends Model { protected $connection = 'liexin'; protected $table = 'chain'; protected $primaryKey = 'chain_id'; public $timestamps = false; public function chain_check() { return $this->hasMany(ChainCheckModel::class, 'chain_id', 'chain_id'); } public function supplier() { return $this->hasOne(SupplierChannelModel::class, 'supplier_name', 'com_name'); } }