amymeme / board-springboot-vue Goto Github PK
View Code? Open in Web Editor NEWboard by using Springboot and Vue.js
board by using Springboot and Vue.js
Deprecated
oauth2.0을 통한 회원가입도 가능해야하니까 password는 nullable임
또한 password는 아마 sha512같은 암호화된 고정된 길이의 값이 들어갈 것인데, 솔트를 적용할지는 의문(그러면 솔트를 따로 저장할 DB가 필요함.. 만들면 되지 뭐^^!)
ph_number나 email은 비밀번호 찾기에 쓰여야 함
닉네임이 사실 중복체크가 되어야 하는데(게시물에 작성자로 떠야하니까), 이럴 땐 oauth2.0의 닉네임을 중복체크할 수 없어서 문제가 생길 것 같음.... -> oauth인증 후 추가 정보를 받을 수 있는 방법이 있는지 알아보기
id가 VARCHAR인데, PK이므로, 성능 문제가 있을 지 알아보기
provider_users 테이블에 접근해야 하는 경우는 2가지임
처음으로 소셜 계정으로 로그인 시 (provider_name, uniq_id, user_id)를 생성하는 경우,
이후 소셜 계정으로 로그인을 해서 (provider_name, uniq_id)를 통해 user_id를 가져와서 users 테이블에 접근해 회원 정보를 얻어오는 경우
그리고 uniq_id는 provider에서 대부분 숫자(INT)형태로 주는데, 혹시 모르니 좀 더 찾아볼 필요가 있음
지금 생각해둔 provider는 naver와 kakao뿐임
모든 혼란의 기원...
게시글 목록에서 닉네임을 뜨게하고 싶은데, 일반적으로 users의 PK는 nickname이 아닌 id이니까
- user_nickname만을 저장 -> nickname을 uniqe로 설정하고, 인덱스로 하면 FK로 쓸 수 있는지 알아보기
- user_id만을 저장 -> 게시글 목록에서 nickname을 띄우려면 게시글 수(적어도 페이지 내 게시글 수)만큼의 추가 쿼리가 필요하게 됨
- user_id와 user_nickname을 둘 다 저장 -> nickname을 직접 조인하지는 않는 상태지만, user_id로 조인되어 있음, 하지만 nickname이 변경될 경우에 대한 처리를 추가적으로 해야함
3번이 가장 현실성 있을 것 같긴한데, 좀 더 찾아보기
이 외에도 게시글에 사진을 추가하고 싶을 때를 알아보기
아마 URL만을 저장하고 사진데이터는 BLOB이나 다른 형태로 저장하는 것으로 아는데, , 좀 더 찾아보기, , ,,,
얘도 마찬가지로 닉네임을 가져오기 위해 어떻게하면 좋을 지 찾아보기
posts와 commnets의 id는 uuid형태로 하면 간편하고 좋을 것 같음!
auto_increment는 게시글 수나 댓글 수의 max를 생각하게 되서(overflow될까봐..괜한 걱정...^^) 찜찜함
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.