<?php
$scope=json_decode(file_get_contents(__DIR__.'/private-fixture-lease.json'),true);$markedStaff=$scope['staff'];$scope=['staff_uuid'=>$markedStaff['uuid']];$source=static function()use($q,$p,$scope,$check,$markedStaff):array{$staff=$q('SELECT ID,UUID FROM '.$p.'staff WHERE UUID=?',[$scope['staff_uuid']]);$refs=$q('SELECT ID,UUID,NAME,AI_USER_ID,IS_SHOW,JOB_STATUS FROM '.$p.'staff WHERE UUID=?',[$scope['staff_uuid']]);$check($refs===[$markedStaff],'Marked Staff unchanged');$rows=$q('SELECT * FROM '.$p.'syllabus_evaluate WHERE STAFF_UUID=? ORDER BY ID DESC',[$scope['staff_uuid']]);$ext=$q('SELECT ID,UUID,STAFF_UUID,CONTENT FROM '.$p.'syllabus_evaluate_ext WHERE STAFF_UUID=?',[$scope['staff_uuid']]);$check(count($rows)===2&&count($ext)===1,'Only own bounded two/one rows');$own=json_decode(file_get_contents(__DIR__.'/private-fixture-own.json'),true);$check(array_column($rows,'id')===array_reverse(array_column($own['syllabus_evaluate'],'id'))&&array_column($ext,'id')===array_column($own['syllabus_evaluate_ext'],'id'),'Exact own PK source');return ['staff'=>$staff,'rows'=>$rows,'ext'=>$ext];};
