<?php
declare(strict_types=1);$_SERVER['HTTP_HOST']='owned-weight.invalid';require __DIR__.'/app.php';$app=coreApp('CONSTRUCTOR_WARM');require_once $root.'/app/api/common.php';$service=new \app\api\service\user\UserWeight();$models=[];foreach(['staffModel'=>'yoshop_staff','userWeightModel'=>'yoshop_user_weight','userWeightStatusModel'=>'yoshop_user_weight_status','userModel'=>'yoshop_user'] as $p=>$t)ck($service->$p->getTable()===$t,'Exact source constructor model');foreach(['user','staff','user_weight','user_weight_status','user_course','user_score','user_score_log','user_bind','user_health_metric_record'] as $t){$fields=\think\facade\Db::connect('mysql')->getFields('yoshop_'.$t);ck(count($fields)>0,'Real original fields '.$t);$models[$t]=$fields;}ck($models['user']['user_id']['autoinc']&&$models['staff']['id']['autoinc'],'Actual native identity for only two prepare rows');saveOnce('constructor-warm.json',['models'=>$models,'native_SQL'=>CoreGate::$total,'HTTP'=>0,'DML'=>0]);saveOnce('preflight-ready.json',['SQL'=>count(file($runtime.'/sql-budget.jsonl')),'scope_constructor_cap'=>180,'date'=>date('Y-m-d'),'Bind0_metadata_allowed'=>true]);echo json_encode(['lane'=>$lane,'original_tables_warmed'=>9,'SQL'=>count(file($runtime.'/sql-budget.jsonl')),'HTTP'=>0,'DML'=>0]),"\n";
