<?php
declare(strict_types=1);
$meta=json_decode(file_get_contents(__DIR__.'/structure-B.json'),true);$marker='CDXOR11D6A8';$out=['marker'=>$marker,'generated_primary_keys'=>true,'recharge_write_count_per_side'=>4,'real_payment_plan_touched'=>false,'tables'=>[]];foreach(['store'=>2147001111,'terminal'=>2147001112] as $module=>$tenant){foreach(['recharge_order'=>'order_id','recharge_order_plan'=>'order_plan_id'] as $table=>$pk){$row=[];foreach($meta['tables'][$table]['columns'] as $c){$k=$c['column_name'];if($k===$pk)continue;$t=strtolower($c['data_type']);if(strpos($t,'decimal')!==false)$row[$k]='0.00';elseif(strpos($t,'int')!==false)$row[$k]=0;elseif($t==='date')$row[$k]='2026-10-11';else$row[$k]='';}$row['store_id']=$tenant;$row['create_time']=1791648000;$row['update_time']=1791648000;if($table==='recharge_order'){$row['order_no']=$marker.'_'.$module;$row['user_id']='@existing_proven_own_user_id';$row['recharge_type']=10;$row['gift_rule_snapshot']='{}';$row['pay_status']=10;$row['platform']='H5';$row['note']='零资金读取样本 '.$marker;$row['create_by']=$marker;$row['is_delete']=1;}else{$row['order_id']='@own_new_recharge_order_id';$row['plan_name']='隔离零金额快照 '.$marker;$row['plan_id']=0;}$out['tables'][$module][$table]=$row;}}
file_put_contents(__DIR__.'/fixture-values-template.json',json_encode($out,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES));echo json_encode(['all_nonPK_columns_explicit'=>true,'INSERT_per_side'=>4,'plan_id'=>0,'paid'=>false,'all_funds_zero'=>true]),"\n";
