hasMany(SerialNumberDetail::class, 'sn_batch_id', 'id'); } public function user() { return $this->belongsTo(User::class); } }