여유상점_1005 : 18) Project Participation Table

오범준·2020년 10월 12일
0

1. Creating New Table which stores participating info

Will create totally new one
with 2 primary keys which are also foreign key

1) column with client Id in "Id" in "member" table
2) column with Project ID in "Prog_Num" in "project" table

Column info

  • project num : which project you join : text
  • client Id : id for client : text
  • name : name for client : text
  • gender : gender for client : text
  • birth : text
  • phoneNum : text
  • emergency call( 비상 연락처 ) : text
  • Address : text
  • WantStartDate : 참여 희망날짜 ( 시작일 ) : text
  • WantEndDate : 참여 종료날짜 ( 종료이 ) : text
  • WhyParticipate : 여유상점 참여 이유 : text ( CKEditor )
  • Question :질문사항 : text
  • Option1
  • Option2
  • Option3

2. Getting Client Info, Project Info through req.param

Creating new Route, page for Participation Page

< Let's See the Process >
1) get the prog_num in current browser and send it as parameter

  • prevent person from going in if not loggined

how?

when you render ( partials/is_loggined)
add span hidden which contains info on
whethere user is loggined or not ( ex. false, true )

ex. if <%= is_loggined %> == false
alert

else
allow users

2) as you reach the router.get('participatelink')

3. Approach DB and render datas

1) project info by getting Prog_Num
2) member info by getting req.user
3) ruleforhomepage

4. RegiForm

1) 개인정보 수집 및 이용
2) 개인정보 제 3자 제공
3) 수송 대행 약관
4) 전자상거래 개정 약관
5) 취소 및 환불 규정

All From Table " RuleForHomePage"

Also Make Admin Page for "Editing" This rules

5. save incoming infos to 2 tables

1) projectparticipate
2) member

1) 우선 insert 시키고
2) option 사항 ( project insert, edit ) int 로 바꾸고
3) project 참가목록 cost 더하는 과정 작성하고
4) 이후, insert 다시

member 내 primary key 변경
projectparticipate 내 foregin key 벼경

profile
Dream of being "물빵개" ( Go abroad for Dance and Programming)

0개의 댓글