- 요구사항 분석
- ORM 사용 하여 구현 : sequelize 사용
- RDBMS 사용 : sqlite사용
- 필요한 모델 만들기 : 회사 (company) , 사용자 (user) , 채용공고 (posting), 지원내역(apply)
- 추가 기능
- 구현과정 2-1. model 설계
2-2. 필요한 npm 모듈 설치
- 기능설명
- POST /list
- request data 예시
{
"company_id": 1,
"position" : "fnd-developer",
"rewards" : 15000000,
"content" : "We are looking for a developer as an;......",
"tech_stack" : "python, aws "
}
- response
status : 200,
message : "posted"
- PUT /list/edit
- 원데이터
{
"lists": [
{
"posting_id": 1,
"company_id": "1",
"position": "backend-developer",
"rewards": 15000000,
"content": "We are looking for a developer as an;......",
"tech_stack": "python, aws ",
"createdAt": "2022-10-12T07:56:49.046Z",
"updatedAt": "2022-10-12T07:56:58.779Z",
"company": {
"name": "Wanted Co",
"country": "Korea",
"region": "Seoul"
}
}
]
}
- request data 예시
{
"posting_id" : 1,
"position" : "front-developer",
"rewards" : 15000000,
"content" : "We are looking for a developer as an;......",
"tech_stack" : "python, aws "
}
- response ( data 변경 후 )
{
"detail": {
"posting_id": 1,
"company_id": "1",
"position": "front-developer",
"rewards": 15000000,
"content": "We are looking for a developer as an;......",
"tech_stack": "python, aws ",
"createdAt": "2022-10-12T07:56:49.046Z",
"updatedAt": "2022-10-12T07:58:01.731Z",
"company": {
"name": "Wanted Co",
"country": "Korea",
"region": "Seoul"
}
}
}
-
DELETE /list
-
request data 예시
{ "posting_id " : 1 }
-
response
status : 200,
message : "deleted"
- GET /list
- response data
{
"lists": [
{
"posting_id": 1,
"company_id": "1",
"position": "front-developer",
"rewards": 15000000,
"content": "We are looking for a developer as an;......",
"tech_stack": "python, aws ",
"createdAt": "2022-10-12T07:24:07.930Z",
"updatedAt": "2022-10-12T07:24:07.930Z",
"company": {
"name": "Wanted Co",
"country": "Korea",
"region": "Seoul"
}
},
{
"posting_id": 2,
"company_id": "1",
"position": "backend-developer",
"rewards": 15000000,
"content": "We are looking for a developer as an;......",
"tech_stack": "python, aws ",
"createdAt": "2022-10-12T07:24:23.368Z",
"updatedAt": "2022-10-12T07:24:23.368Z",
"company": {
"name": "Wanted Co",
"country": "Korea",
"region": "Seoul"
}
}
]
}
-
url : GET /list
-
request 예시 : /list?keyword=front
-
response data 예시
{
"lists": [
{
"posting_id": 1,
"company_id": "1",
"position": "front-developer",
"rewards": 15000000,
"content": "We are looking for a developer as an;......",
"tech_stack": "python, aws ",
"createdAt": "2022-10-12T07:24:07.930Z",
"updatedAt": "2022-10-12T07:24:23.368Z",
"company": {
"name": "Wanted Co",
"country": "Korea",
"region": "Seoul"
}
}
]
}
- url : GET / list/:posting_id
- response data 예시
{
"lists": [
{
"posting_id": 1,
"company_id": "1",
"position": "front-developer",
"rewards": 15000000,
"content": "We are looking for a developer as an;......",
"tech_stack": "python, aws ",
"createdAt": "2022-10-12T07:24:07.930Z",
"updatedAt": "2022-10-12T07:24:23.368Z",
"company": {
"name": "Wanted Co",
"country": "Korea",
"region": "Seoul"
}
}
]
}
- url : POST/apply
- request data 예시
{
"posting_id" : 1,
"user_id" : 1
}
- response data
-
- // Apply_Model내 데이터에서 같은 posting_id 에 같은 user_id가 있는경
이미 지원한 이력이 있습니다.
-
- 처음 지원한 경우
status : 200,
message : "지원이 완료 되었습니다."
$ npm install
$ npm start