{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Intake Portal Form Submission",
    "description": "JSON schema for the data generated when a user submits the intake portal form.",
    "type": "object",
    "properties": {
        "reporter": {
            "type": "object",
            "properties": {
                "company_name": {
                    "type": "string",
                    "description": "会社名"
                },
                "department": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "所属・部署"
                },
                "name_submission_type": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "匿名",
                        "実名",
                        null,
                        ""
                    ],
                    "description": "氏名の扱い（匿名/実名）"
                },
                "name_if_real": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "氏名（実名の場合入力）"
                },
                "identity_disclosure_to_company": {
                    "type": "string",
                    "enum": [
                        "匿名",
                        "実名"
                    ],
                    "description": "会社への通知（匿名/実名）"
                },
                "contact_result_preference": {
                    "type": "string",
                    "enum": [
                        "希望する",
                        "希望しない"
                    ],
                    "description": "調査結果等の連絡"
                },
                "contact_methods": {
                    "type": "string",
                    "enum": [
                        "メール",
                        "電話",
                        "郵送"
                    ],
                    "description": "連絡方法（選択）"
                },
                "contact_email": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "メールアドレス（連絡用および確認用）"
                },
                "contact_phone": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "電話番号"
                },
                "contact_address_full": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "郵送先住所"
                },
                "contact_zip_code": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "郵便番号"
                }
            },
            "required": [
                "company_name",
                "identity_disclosure_to_company",
                "contact_result_preference",
                "contact_methods"
            ],
            "additionalProperties": false
        },
        "case_content": {
            "type": "object",
            "properties": {
                "category": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "enum": [
                            "法令違反",
                            "ハラスメント相談",
                            "社内ルール違反",
                            "意見・要望・改善提案"
                        ]
                    },
                    "description": "内容（カテゴリ）",
                    "minItems": 1
                },
                "when_happened": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "いつ？"
                },
                "where_happened": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "どこで？"
                },
                "how_recognized": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "どのように（知ったか）"
                },
                "description_detail": {
                    "type": "string",
                    "description": "どのようなことがあったか"
                },
                "request_to_company": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "会社への要望"
                },
                "third_party_awareness": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "知っている",
                        "知らない",
                        null,
                        ""
                    ],
                    "description": "他の人も知っているか"
                },
                "evidence_exists": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "ある",
                        "ない",
                        null,
                        ""
                    ],
                    "description": "証拠になるものはあるか"
                }
            },
            "required": [
                "category",
                "description_detail"
            ],
            "additionalProperties": false
        },
        "accused": {
            "type": "object",
            "properties": {
                "company_name": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "対象者の会社名"
                },
                "department": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "対象者の所属・部署"
                },
                "position": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "対象者の役職"
                },
                "name": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "対象者の氏名"
                }
            },
            "additionalProperties": false
        },
        "final_contact_email": {
            "type": [
                "string",
                "null"
            ],
            "description": "ご連絡用メールアドレス"
        },
        "report_date": {
            "type": [
                "string",
                "null"
            ],
            "format": "date",
            "description": "通報日"
        }
    },
    "required": [
        "reporter",
        "case_content",
        "accused",
        "final_contact_email"
    ],
    "additionalProperties": false
}