<?php
declare(strict_types=1);require __DIR__.'/app.php';$app=coreApp('RELATED_FILE_LEASE');$pre=json_decode(file_get_contents($runtime.'/preflight-read.json'),true);$store=readNative('AI','SELECT * FROM yoshop_store WHERE store_id=?',[10001]);ck(count($store)===1&&(int)$store[0]['is_delete']===0&&(int)$store[0]['is_recycle']===0,'Exact original actor tenant Store relation');$ids=[(string)$pre['user_fullrows'][0]['avatar_id'],(string)$store[0]['logo_image_id']];saveOnce('related-file-lease.json',['actor'=>getenv('CORE_LANE')==='B'?44676:1836,'tenant'=>10001,'allowed_file_ids'=>array_values(array_unique($ids)),'tenant_store_fullrows'=>$store,'source_relation'=>'common.User.avatar file_id=avatar_id; common.Store.detail with api.Store.logoImage file_id=logo_image_id','HTTP'=>0,'DML'=>0]);echo json_encode(['lane'=>$lane,'related_file_ids_frozen'=>count(array_unique($ids)),'HTTP'=>0,'DML'=>0]),"\n";
