// school-enrollment-system — 画面固有設定（app-core.js が window.SYSTEM_CONFIG を読む）
window.SYSTEM_CONFIG = {
  domains: [
  { id: "school-children", label: "就学児童", endpoint: "/api/school-children",
    cols: [{ key: "childNumber", label: "児童番号" }, { key: "fullName", label: "氏名" }, { key: "birthDate", label: "生年月日" }, { key: "address", label: "住所" }, { key: "status", label: "状態", badge: true }],
    createFields: [{ name: "fullName", label: "氏名", required: true, placeholder: "山田 太郎" }, { name: "birthDate", label: "生年月日", required: true, type: "date" }, { name: "address", label: "住所", required: true, placeholder: "東京都..." }] },
  { id: "enrollments", label: "就学申請", endpoint: "/api/enrollments",
    cols: [{ key: "childId", label: "児童ID" }, { key: "assignedSchool", label: "配当校" }, { key: "schoolYear", label: "学年" }, { key: "status", label: "状態", badge: true }, { key: "createdAt", label: "申請日時" }],
    createFields: [{ name: "childId", label: "児童ID", required: true, placeholder: "登録済み児童のIDを入力" }, { name: "assignedSchool", label: "配当校名", required: true, placeholder: "○○小学校" }, { name: "schoolYear", label: "学年", required: true, placeholder: "1" }] },
],
  calc: { title: "就学 学齢・学年の試算", endpoint: "/api/school/grade", primary: { key: "gradeLabel", label: "学年", format: "text" }, fields: [ { key: "birthDate", label: "生年月日", type: "date" }, { key: "asOf", label: "基準日（任意）", type: "date" } ] },
};
