Open jangjinhong opened 3 weeks ago
follow ๊ธฐ๋ฅ ์์
~Repository, Service, Controller
~Form
[ ] follow, unfollow, followers์กฐํ, followings์กฐํ 4๊ฐ์ง๋ฅผ ํ ์คํธํด์ฃผ์ธ์
[ o ] API TEST [ ] TEST CODE
์์์ 2๋ช ์ด์์ member๋ฅผ ๋ง๋์ ์ผ ํฉ๋๋ค. A๊ฐ B๋ฅผ ํ๋ก์ฐํ ๋, A๋ B์ follower๊ฐ ๋๊ณ , B๋ A์ following ๋ชฉ๋ก์ ํฌํจ๋ฉ๋๋ค ์ด ์ ์ ์ดํดํ์ ์ผ ํ ์คํธํ ๋ ํผ๋์ด ์์ ๊ฒ์ ๋๋ค..! ํน์ ๋ชฐ๋ผ ์ฝ๋์ ์ฃผ์์ ๋ฌ์๋์์ต๋๋ค.
memberId 2๋ฒ์ด memberId 1๋ฒ์ followํ ์ํฉ์ ๋๋ค.
memberId 1๋ฒ์ follower ๋ฆฌ์คํธ ์กฐํ์ 2๋ฒ์ด ๋ฐํ๋ฉ๋๋ค.
๋ฐ๋๋ก 1๋ฒ์ following ๋ชฉ๋ก์ 2๋ฒ์ด ํฌํจ๋์ด ์์ต๋๋ค.
2๋ฒ์ด 1๋ฒ์ unfollowํ ํ DB ์ํ์ ๋๋ค.
๐ AS-IS (์ฝ๋ ๋ฐ๋๊ธฐ ์ )
follow ๊ธฐ๋ฅ ์์
โจ To-Be (๋ฐ๋ ํ)
~Repository, Service, Controller
~Form
๐ง ๋ฆฌ๋ทฐ์ด๋ค์ด ๋ดค์ผ๋ฉด ํ๋ ์
[ ] follow, unfollow, followers์กฐํ, followings์กฐํ 4๊ฐ์ง๋ฅผ ํ ์คํธํด์ฃผ์ธ์
โ๏ธ TEST ์ฌํญ
[ o ] API TEST [ ] TEST CODE
๐ธ ํ ์คํธ ์คํฌ๋ฆฐ์ท
์์์ 2๋ช ์ด์์ member๋ฅผ ๋ง๋์ ์ผ ํฉ๋๋ค. A๊ฐ B๋ฅผ ํ๋ก์ฐํ ๋, A๋ B์ follower๊ฐ ๋๊ณ , B๋ A์ following ๋ชฉ๋ก์ ํฌํจ๋ฉ๋๋ค ์ด ์ ์ ์ดํดํ์ ์ผ ํ ์คํธํ ๋ ํผ๋์ด ์์ ๊ฒ์ ๋๋ค..! ํน์ ๋ชฐ๋ผ ์ฝ๋์ ์ฃผ์์ ๋ฌ์๋์์ต๋๋ค.
์๋๋ฆฌ์ค ์ค๋ช โผ๏ธ
memberId 2๋ฒ์ด memberId 1๋ฒ์ followํ ์ํฉ์ ๋๋ค.![image](https://github.com/AYU-Side-Hidden-Gems-Playlist/back/assets/57760551/8ef1546a-46c7-4f9d-8a2b-1aff0471ea14)