// 開発 dev サーバの既定ユーザ。
// roles は apps/api/src/authz.js の ROLES 定義 (WINDOW / REVIEW / RESTRICTION_RELEASE / ADMIN)
// と一致させる必要がある。一致しないと canAction(...) が false を返し、検索すら 403 になる。
// dev では「窓口担当 + 証明発行担当」相当の WINDOW を既定とし、テスト用に X-Dev-Roles で
// 別ロールを差し込めるようにしている。
export const me = {
  userId: "u-window-001",
  fullName: "山田 太郎",
  department: "住民課 窓口係",
  roles: ["WINDOW"],
};

export const residents = [
  { residentId: "0000123456", householdId: "H-00045", familyNameKanji: "住民", givenNameKanji: "太郎", familyNameKana: "ジュウミン", givenNameKana: "タロウ", birthDate: "1985-04-01", sex: "M", addressCode: "132010001001", addressText: "東京都サンプル市中央町1-2-3", relationToHead: "本人", movedInDate: "2018-06-01", movedOutDate: null, juminCode: "12345678901", myNumber: "123456789018", nationality: null, foreigner: null, alias: [], restrictions: [], validFrom: "2018-06-01T00:00:00+09:00", validTo: null },
  { residentId: "0000123457", householdId: "H-00045", familyNameKanji: "住民", givenNameKanji: "花子", familyNameKana: "ジュウミン", givenNameKana: "ハナコ", birthDate: "1988-09-12", sex: "F", addressCode: "132010001001", addressText: "東京都サンプル市中央町1-2-3", relationToHead: "妻", movedInDate: "2018-06-01", movedOutDate: null, juminCode: "12345678902", myNumber: "223456789014", nationality: null, foreigner: null, alias: [], restrictions: [{ id: "R-1001", residentId: "0000123457", category: "DV", startDate: "2025-04-01", endDate: null, scope: "SELF", releaseRole: "RESTRICTION_RELEASE", note: "支援措置対象" }], validFrom: "2018-06-01T00:00:00+09:00", validTo: null },
  { residentId: "0000124000", householdId: "H-00990", familyNameKanji: "王", givenNameKanji: "明", familyNameKana: "ワン", givenNameKana: "ミン", birthDate: "1990-01-15", sex: "M", addressCode: "132010044006", addressText: "東京都サンプル市港町5-6", relationToHead: "本人", movedInDate: "2023-10-20", movedOutDate: null, juminCode: "22345678901", myNumber: "323456789010", nationality: "中国", foreigner: { residenceStatus: "技術・人文知識・国際業務", residencePeriodEnd: "2027-10-19", passportNo: "P12345678", nationalityFull: "中華人民共和国", aliasKanji: "王 明", specialPermanentResident: false }, alias: [{ kind: "ALIAS", valueKanji: "王 明", valueKana: "ワン ミン", validFrom: "2023-10-20", validTo: null }], restrictions: [], validFrom: "2023-10-20T00:00:00+09:00", validTo: null }
];

export const transactions = [{ transactionId: "TX-20260516-0001", residentId: "0000123456", householdId: "H-00045", typeCode: "MOVE", reasonCode: "ADDRESS_FIX", eventDate: "2026-05-01", processedDate: "2026-05-16", receiverOffice: "住民課", status: "APPLIED", parentTransactionId: null, items: [{ field: "addressText", valueBefore: "東京都サンプル市中央町1-2-2", valueAfter: "東京都サンプル市中央町1-2-3" }] }];
export const auditLogs = [{ logId: 1, userId: "u-window-001", ip: "127.0.0.1", action: "BOOTSTRAP", resourceType: "SYSTEM", resourceId: "resident-record-web", occurredAt: "2026-05-16T17:30:00+09:00", details: { source: "seed" } }];
