{"openapi":"3.0.3","info":{"title":"臺菲直接聘僱計畫 — 招工需求 Mock API (GET only)","description":"依據「招工需求相關五個資料表結構」與「Matching Demand Forms 1校版本」設計。\n\n**特性**\n- 純 GET 端點，唯讀\n- JSON key 採 PascalCase，對齊資料表欄位（PK=`ID`, FK=`XxxId`）\n- 主端點 `/api/job-requests` 一次回傳已 join 的完整資料：\n  - 字典 lookup：`WorkType` / `CompanyType` / `WorkTypeDetails` / `RequiredDocs`\n  - 列舉中文：`SourceText` / `CaseTypeText` / `SelectionProcessText` / `PreferredGenderText` / `PreferredNationsText` / `AlgorithmStatusText` / `StatusText`\n  - 子表：`Qualifications` / `Expenses` / `NamedTalents`\n- 支援 `ID` 或 `CreateTime` 區間查詢\n\n**資料表**\n- `TB_JobRequest` 招工需求主檔\n- `TB_JobRequestQualification` / `TB_JobRequestDeploymentExpense` / `TB_JobRequestNamedTalent`\n- 字典：`TB_WorkType` / `TB_WorkTypeDetail` / `TB_CompanyType` / `TB_Qualification`\n\n**預載假資料**：2026-05-24 / 25 / 26 各 3 筆\n","version":"2.1.0"},"servers":[{"url":"https://wda-mock-api.pages.dev","description":"Current host"}],"tags":[{"name":"JobRequest","description":"招工需求（含 join 字典 / 資格 / 費用 / 指名人才）"}],"paths":{"/api/job-requests":{"get":{"tags":["JobRequest"],"summary":"取得招工需求（已 join 字典 / 資格 / 費用 / 指名人才）","description":"- 不帶任何參數：回傳全部 9 筆\n- `ID`: 取得單筆（多個請用逗號分隔 例 `?ID=1,2`）\n- `CreateTimeFrom` / `CreateTimeTo`: ISO 8601 時間區間（含端點）\n- **`ID` 與 `CreateTimeFrom`/`CreateTimeTo` 可同時使用，會以 AND 串聯**：\n  例如 `?ID=1&CreateTimeFrom=2026-05-25T00:00:00+08:00` 會先用 ID 篩出該筆，\n  再要求其 `CreateTime` 落在區間內，否則回傳空陣列。\n- `Sort`: `CreateTime` 或 `-CreateTime` / `ID` 或 `-ID`（預設 `-CreateTime`）\n\nQuery 參數大小寫不挑（`ID`/`Id`/`id` 都接受）。\n","parameters":[{"in":"query","name":"ID","schema":{"type":"string"},"description":"招工需求 ID（單一或逗號分隔多個）","examples":{"single":{"value":"1"},"multi":{"value":"1,2,3"}}},{"in":"query","name":"CreateTimeFrom","schema":{"type":"string","format":"date-time"},"description":"ISO 8601，含端點","example":"2026-05-24T00:00:00+08:00"},{"in":"query","name":"CreateTimeTo","schema":{"type":"string","format":"date-time"},"description":"ISO 8601，含端點","example":"2026-05-24T23:59:59+08:00"},{"in":"query","name":"Sort","schema":{"type":"string","enum":["CreateTime","-CreateTime","ID","-ID"],"default":"-CreateTime"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"Total":{"type":"integer","example":9},"Items":{"type":"array","items":{"$ref":"#/components/schemas/JobRequestJoined"}}}}}}}}}}},"components":{"schemas":{"AuditFields":{"type":"object","properties":{"Creator":{"type":"integer","nullable":true},"Updater":{"type":"integer","nullable":true},"CreateTime":{"type":"string","format":"date-time"},"UpdateTime":{"type":"string","format":"date-time"}}},"WorkType":{"allOf":[{"type":"object","properties":{"ID":{"type":"integer","example":1},"Code":{"type":"string","example":"S0"},"NameZh":{"type":"string","example":"旅宿服務工作"},"NameEn":{"type":"string","example":"Hospitality"},"NameTh":{"type":"string","nullable":true},"NameId":{"type":"string","nullable":true},"NameVn":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Seq":{"type":"integer"},"Status":{"type":"integer"}}},{"$ref":"#/components/schemas/AuditFields"}]},"WorkTypeDetail":{"allOf":[{"type":"object","properties":{"ID":{"type":"integer"},"WorkTypeId":{"type":"integer"},"NameZh":{"type":"string"},"NameEn":{"type":"string"},"NameTh":{"type":"string","nullable":true},"NameId":{"type":"string","nullable":true},"NameVn":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Seq":{"type":"integer"},"IsJobReq":{"type":"boolean"},"Status":{"type":"integer"}}},{"$ref":"#/components/schemas/AuditFields"}]},"CompanyType":{"allOf":[{"type":"object","properties":{"ID":{"type":"integer"},"WorkTypeId":{"type":"integer"},"NameZh":{"type":"string"},"NameEn":{"type":"string"},"NameTh":{"type":"string","nullable":true},"NameId":{"type":"string","nullable":true},"NameVn":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Seq":{"type":"integer"},"Status":{"type":"integer"}}},{"$ref":"#/components/schemas/AuditFields"}]},"Qualification":{"allOf":[{"type":"object","properties":{"ID":{"type":"integer"},"WorkTypeId":{"type":"integer"},"CateCode":{"type":"integer","enum":[1,2,3],"description":"1=學經歷, 2=語文能力, 3=技術能力"},"Code":{"type":"string"},"Name":{"type":"object","description":"多國語系 JSON：ZH / EN / TH / ID / VN","example":{"ZH":"在臺畢業僑外生","EN":"Foreign students ..."}},"Seq":{"type":"integer"},"Status":{"type":"integer"}}},{"$ref":"#/components/schemas/AuditFields"}]},"DeploymentFeeDict":{"type":"object","properties":{"Code":{"type":"integer"},"NameZh":{"type":"string"},"NameEn":{"type":"string"},"Amount":{"type":"string","nullable":true}}},"DocCodeDict":{"type":"object","properties":{"Code":{"type":"integer"},"NameZh":{"type":"string"},"NameEn":{"type":"string"}}},"EnumDict":{"type":"object","properties":{"Source":{"type":"object","example":{"1":"後台","2":"介接送入"}},"CaseType":{"type":"object","example":{"1":"開放式","2":"指名聘僱"}},"SelectionProcess":{"type":"object","example":{"1":"當地面試","2":"視訊面試","3":"履歷表挑選"}},"PreferredGender":{"type":"object","example":{"1":"男","2":"女","3":"不限"}},"PreferredNations":{"type":"object","example":{"TW":"台灣","PH":"菲律賓","VN":"越南","ID":"印尼","TH":"泰國"}},"AlgorithmStatus":{"type":"object","example":{"1":"可媒合","2":"暫停","9":"結案"}},"Status":{"type":"object","example":{"1":"啟用","2":"停用","9":"作廢"}}}},"JobRequestJoined":{"type":"object","description":"招工需求主檔，已展開字典與子表","properties":{"ID":{"type":"integer","example":1},"Source":{"type":"integer","example":1},"SourceText":{"type":"string","example":"後台"},"ExternalId":{"type":"string","nullable":true},"GUINumber":{"type":"string","example":"11000001","description":"雇主統一編號 — 對應內部系統 TB_Broker.GUINumber，跨系統確認雇主唯一性的鍵"},"BrokerId":{"type":"integer","example":101},"CaseType":{"type":"integer","example":1},"CaseTypeText":{"type":"string","example":"開放式"},"WorkTypeId":{"type":"integer","example":1},"WorkType":{"$ref":"#/components/schemas/WorkType"},"CompanyTypeId":{"type":"integer","example":1},"CompanyType":{"$ref":"#/components/schemas/CompanyType"},"CompanyNameZh":{"type":"string"},"CompanyNameEn":{"type":"string"},"CompanyWebsite":{"type":"string","nullable":true},"CompanyProfileZh":{"type":"string","nullable":true},"CompanyProfileEn":{"type":"string","nullable":true},"CompanyPhone":{"type":"string","nullable":true},"ContactNameZh":{"type":"string","nullable":true},"ContactNameEn":{"type":"string","nullable":true},"ContactEmail":{"type":"string","nullable":true},"RequiredCount":{"type":"integer"},"ExpectedStartDate":{"type":"string","example":"20260801"},"SelectionProcess":{"type":"array","items":{"type":"integer"},"nullable":true},"SelectionProcessText":{"type":"array","items":{"type":"string"},"example":["視訊面試","履歷表挑選"]},"TargetSelectionDate":{"type":"string","nullable":true},"MinAge":{"type":"integer","nullable":true},"MaxAge":{"type":"integer","nullable":true},"MinHeight":{"type":"integer","nullable":true},"MaxHeight":{"type":"integer","nullable":true},"MinWeight":{"type":"integer","nullable":true},"MaxWeight":{"type":"integer","nullable":true},"PreferredGender":{"type":"integer","nullable":true},"PreferredGenderText":{"type":"string","nullable":true,"example":"不限"},"PreferredNations":{"type":"array","items":{"type":"string"},"example":["PH"]},"PreferredNationsText":{"type":"array","items":{"type":"string"},"example":["菲律賓"]},"OtherPublicCriteria":{"type":"array","items":{"type":"string"},"nullable":true},"RequiredDocCodes":{"type":"array","items":{"type":"integer"}},"RequiredDocs":{"type":"array","items":{"$ref":"#/components/schemas/DocCodeDict"}},"JobTitle":{"type":"string","nullable":true},"WorkTypeDetailIds":{"type":"array","items":{"type":"integer"},"nullable":true},"WorkTypeDetails":{"type":"array","items":{"$ref":"#/components/schemas/WorkTypeDetail"}},"SalaryMin":{"type":"integer"},"SalaryMax":{"type":"integer"},"OvertimeHoursPerDay":{"type":"integer","nullable":true},"FreeMealsPerDay":{"type":"integer","nullable":true},"NightShiftAllowance":{"type":"integer","nullable":true},"FoodAllowance":{"type":"integer","nullable":true},"OtherAllowance":{"type":"integer","nullable":true},"DeductionNHI":{"type":"integer","nullable":true},"DeductionLaborIns":{"type":"integer","nullable":true},"DeductionFoodAccom":{"type":"integer","nullable":true},"DeductionOther":{"type":"integer","nullable":true},"PreferredGenderMaleCount":{"type":"integer","nullable":true},"PreferredGenderFemaleCount":{"type":"integer","nullable":true},"InternalMinAge":{"type":"integer","nullable":true},"InternalMaxAge":{"type":"integer","nullable":true},"InternalMinHeight":{"type":"integer","nullable":true},"InternalMaxHeight":{"type":"integer","nullable":true},"InternalMinWeight":{"type":"integer","nullable":true},"InternalMaxWeight":{"type":"integer","nullable":true},"PreferredResidenceArea":{"type":"string","nullable":true},"InternalCriteriaMemo":{"type":"string","nullable":true},"AlgorithmStatus":{"type":"integer"},"AlgorithmStatusText":{"type":"string","example":"可媒合"},"ReceivedTime":{"type":"string","format":"date-time"},"Memo":{"type":"string","nullable":true},"Status":{"type":"integer"},"StatusText":{"type":"string","example":"啟用"},"Creator":{"type":"integer","nullable":true},"Updater":{"type":"integer","nullable":true},"CreateTime":{"type":"string","format":"date-time"},"UpdateTime":{"type":"string","format":"date-time"},"Qualifications":{"type":"array","items":{"$ref":"#/components/schemas/JobRequestQualificationJoined"}},"Expenses":{"type":"array","items":{"$ref":"#/components/schemas/JobRequestExpenseJoined"}},"NamedTalents":{"type":"array","items":{"$ref":"#/components/schemas/JobRequestNamedTalentJoined"}}}},"JobRequestQualificationJoined":{"type":"object","properties":{"ID":{"type":"integer"},"JobRequestId":{"type":"integer"},"QualificationId":{"type":"integer"},"CateCode":{"type":"integer"},"CateCodeText":{"type":"string","example":"學經歷"},"Code":{"type":"string"},"NameZh":{"type":"string"},"NameEn":{"type":"string"},"Status":{"type":"integer"},"CreateTime":{"type":"string","format":"date-time"}}},"JobRequestExpenseJoined":{"type":"object","properties":{"ID":{"type":"integer"},"JobRequestId":{"type":"integer"},"FeeCode":{"type":"integer"},"FeeNameZh":{"type":"string"},"FeeNameEn":{"type":"string"},"FeeAmount":{"type":"string","nullable":true},"PaidByEmployer":{"type":"boolean"},"PaidByWorker":{"type":"boolean"},"OtherDescription":{"type":"string","nullable":true},"Status":{"type":"integer"},"CreateTime":{"type":"string","format":"date-time"}}},"JobRequestNamedTalentJoined":{"type":"object","properties":{"ID":{"type":"integer"},"JobRequestId":{"type":"integer"},"NameZh":{"type":"string","nullable":true},"NameEn":{"type":"string"},"PassportNumberMasked":{"type":"string","example":"P12****890"},"NationCode":{"type":"string"},"NationText":{"type":"string","example":"菲律賓"},"BirthDate":{"type":"string"},"ResidentNumber":{"type":"string","nullable":true},"ExistsInPool":{"type":"boolean"},"MatchedTalentId":{"type":"integer","nullable":true},"Status":{"type":"integer"},"CreateTime":{"type":"string","format":"date-time"}}}}}}