Last active
May 20, 2025 08:24
-
-
Save bakyeono/bd363ec3e151efc8b7a0bd57dc86cb6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://gist.githubusercontent.com/bakyeono/bd363ec3e151efc8b7a0bd57dc86cb6f/raw/ec291b45b8eb376d20caa3c6e3446e5ae8dc2fd1/producer-and-productions-change-payload-v20250512.schema.json", | |
"$defs": { | |
"EnumFacilityType": { | |
"type": "string", | |
"description": "OPEN_FIELD: 노지, OPEN_FIELD_WITH_SMART_FARM: 노지 스마트팜, GREENHOUSE: 비닐하우스, GREENHOUSE_WITH_SMART_FARM: 비닐하우스 스마트팜, GLASSHOUSE: 유리온실, GLASSHOUSE_WITH_SMART_FARM: 유리온실 스마트팜", | |
"enum": [ | |
"OPEN_FIELD", | |
"OPEN_FIELD_WITH_SMART_FARM", | |
"GREENHOUSE", | |
"GREENHOUSE_WITH_SMART_FARM", | |
"GLASSHOUSE", | |
"GLASSHOUSE_WITH_SMART_FARM" | |
] | |
}, | |
"EnumSupplierType": { | |
"type": "string", | |
"description": "FARMER: 농부, DISTRIBUTOR: 유통인", | |
"enum": [ | |
"FARMER", | |
"DISTRIBUTOR" | |
] | |
}, | |
"EnumProducerShippingChannel": { | |
"type": "string", | |
"description": "OTHER: 기타, WHOLESALE_MARKET: 도매시장, 공판장, NONGHYEOP: 농협, CORPORATION: 영농조합, 농업회사, ORIGIN_BASED_DISTRIBUTOR: 산지 수집상, B2B: 유통업체 (식자재, 급식, 마트 등), B2C: 개인 판매 (온라인, 노상), LOCAL_MARKET: 로컬 푸드 직매장", | |
"enum": [ | |
"OTHER", | |
"WHOLESALE_MARKET", | |
"NONGHYEOP", | |
"CORPORATION", | |
"ORIGIN_BASED_DISTRIBUTOR", | |
"B2B", | |
"B2C", | |
"LOCAL_MARKET" | |
] | |
} | |
}, | |
"type": "object", | |
"title": "생산자와 생산 수정 JSON 스키마", | |
"description": "생산자와 생산 수정 JSON 스키마", | |
"required": [ | |
"target_producer_id" | |
], | |
"anyOf": [ | |
{ | |
"required": [ | |
"update_producer" | |
] | |
}, | |
{ | |
"required": [ | |
"upsert_productions" | |
] | |
} | |
], | |
"additionalProperties": false, | |
"properties": { | |
"target_type": { | |
"type": "string", | |
"title": "수정 대상의 유형", | |
"description": "고정값: \"PRODUCER_AND_PRODUCTIONS\"", | |
"const": "PRODUCER_AND_PRODUCTIONS" | |
}, | |
"target_producer_id": { | |
"type": "integer", | |
"title": "수정 대상 생산자 ID", | |
"description": "수정사항은 단일한 생산자로 한정됩니다. 즉, 동봉된 수정 내용의 수정 대상이 이 값과 일치해야 합니다." | |
}, | |
"update_producer": { | |
"type": "object", | |
"title": "생산자 수정 대상과 수정 내용", | |
"required": [ | |
"target", | |
"values" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"target": { | |
"type": "object", | |
"title": "수정 대상", | |
"required": [ | |
"producer_id" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"producer_id": { | |
"type": "integer", | |
"title": "대상 생산자 ID" | |
} | |
} | |
}, | |
"values": { | |
"type": "object", | |
"title": "수정 내용", | |
"minProperties": 1, | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string", | |
"title": "이름" | |
}, | |
"phone": { | |
"type": "string", | |
"title": "전화번호" | |
}, | |
"memo": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "메모" | |
}, | |
"total_production_area_pyeong": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "총 생산 면적 (평)" | |
}, | |
"is_on_blacklist": { | |
"type": "boolean", | |
"title": "블랙리스트 여부" | |
}, | |
"address_region_category_id": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "주소 지역 분류 ID" | |
}, | |
"address_region_category_legal_id": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "주소 지역 분류 (법정동) ID" | |
}, | |
"address_land_based": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "지번 주소" | |
}, | |
"address_road_based": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "도로명 주소" | |
}, | |
"address_detail": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "상세 주소: 주소지 내 세부 위치 (예: A아파트 B동 C호)" | |
}, | |
"address_land_type_code": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "지번 유형 코드: 일반은 '1', 임야는 '2'를 입력", | |
"enum": [ | |
null, | |
"1", | |
"2" | |
] | |
}, | |
"address_land_number_1": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "지번 본번" | |
}, | |
"address_land_number_2": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "지번 부번" | |
}, | |
"organization_type": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "생산단체 유형" | |
}, | |
"representative_name": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "생산단체 대표자 이름" | |
}, | |
"number_of_members": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "생산단체 구성원 수" | |
}, | |
"number_of_members_appr_start": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "생산단체 구성원 수 범위 시작" | |
}, | |
"number_of_members_appr_end": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "생산단체 구성원 수 범위 끝" | |
}, | |
"career_json": { | |
"type": [ | |
"object", | |
"null" | |
], | |
"title": "경력 정보 (JSON, 자유형식)" | |
}, | |
"business_registration_number": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "생산단체 사업자등록번호", | |
"maxLength": 10, | |
"pattern": "^[0-9]{10}$" | |
}, | |
"email": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "생산단체 이메일", | |
"format": "email" | |
}, | |
"shipping_channels": { | |
"type": [ | |
"array", | |
"null" | |
], | |
"title": "출하 채널", | |
"items": { | |
"$ref": "#/$defs/EnumProducerShippingChannel" | |
} | |
}, | |
"supplier_types": { | |
"type": [ | |
"array", | |
"null" | |
], | |
"title": "공급자 유형", | |
"items": { | |
"$ref": "#/$defs/EnumSupplierType" | |
} | |
}, | |
"farming_skill_certification": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "농사 실력 인증", | |
"description": "수상이력, 명인, 마이스터 등록 등" | |
} | |
} | |
} | |
} | |
}, | |
"upsert_productions": { | |
"type": "array", | |
"minItems": 1, | |
"maxItems": 100, | |
"items": { | |
"type": "object", | |
"title": "생산 수정 대상과 수정 내용", | |
"description": "수정 대상이 존재하지 않는 경우 생성됩니다.", | |
"required": [ | |
"target", | |
"values" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"target": { | |
"type": "object", | |
"title": "수정 대상", | |
"required": [ | |
"producer_id", | |
"product_category_id" | |
], | |
"additionalProperties": false, | |
"properties": { | |
"producer_id": { | |
"type": "integer", | |
"title": "대상 생산자 ID" | |
}, | |
"product_category_id": { | |
"type": "integer", | |
"title": "대상 상품 분류 ID" | |
} | |
} | |
}, | |
"values": { | |
"type": "object", | |
"title": "수정 내용", | |
"minProperties": 1, | |
"additionalProperties": false, | |
"properties": { | |
"address_region_category_id": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "주소 지역 분류 ID" | |
}, | |
"address_region_category_legal_id": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "주소 지역 분류 (법정동) ID" | |
}, | |
"address_land_based": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "지번 주소" | |
}, | |
"address_road_based": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "도로명 주소" | |
}, | |
"address_detail": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "상세 주소", | |
"description": "주소지 내 세부 위치 (예: A아파트 B동 C호)" | |
}, | |
"address_land_type_code": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "지번 유형 코드: 일반은 '1', 임야는 '2'를 입력", | |
"enum": [ | |
null, | |
"1", | |
"2" | |
] | |
}, | |
"address_land_number_1": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "지번 본번" | |
}, | |
"address_land_number_2": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "지번 부번" | |
}, | |
"state": { | |
"type": "string", | |
"enum": [ | |
"UNKNOWN", | |
"PRODUCE", | |
"NOT_PRODUCE" | |
], | |
"title": "상태", | |
"description": "UNKNOWN: 모름, PRODUCE: 생산, NOT_PRODUCE: 비생산" | |
}, | |
"area_pyeong": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "면적 (평)" | |
}, | |
"estimated_harvest_date_kst": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "예상 수확일 (한국 시간)", | |
"format": "date" | |
}, | |
"estimated_harvest_quantity_kg": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "예상 수확량 (kg)" | |
}, | |
"estimated_harvest_quantity_kg_appr_start": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "예상 수확량 범위 시작 (kg)" | |
}, | |
"estimated_harvest_quantity_kg_appr_end": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "예상 수확량 범위 끝 (kg)" | |
}, | |
"shipping_channels": { | |
"type": [ | |
"array", | |
"null" | |
], | |
"title": "출하 채널", | |
"items": { | |
"$ref": "#/$defs/EnumProducerShippingChannel" | |
} | |
}, | |
"facilities": { | |
"type": [ | |
"array", | |
"null" | |
], | |
"items": { | |
"$ref": "#/$defs/EnumFacilityType" | |
}, | |
"title": "시설" | |
}, | |
"harvest_period_text": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "수확 기간 텍스트" | |
}, | |
"number_of_plants": { | |
"type": [ | |
"integer", | |
"null" | |
], | |
"title": "식물 수" | |
}, | |
"recommending_producer_text": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "추천 생산자 텍스트" | |
}, | |
"is_storage_available": { | |
"type": [ | |
"boolean", | |
"null" | |
], | |
"title": "저장 가능 여부" | |
}, | |
"eco_certification": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"title": "친환경 인증" | |
}, | |
"is_delivery_available": { | |
"type": [ | |
"boolean", | |
"null" | |
], | |
"title": "배송 가능 여부" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment