-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add db schema #23
Conversation
@JjungminLee is attempting to deploy a commit to the GDSC Soongsil Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐰 고생 많으셨어요! 이름이랑 속성들 때문에 고민 많으셨겠어요..ㅠㅠ
그리고 제 의견이랑 변경해야할 사항들 리뷰에 남겨놨습니다! 한번씩 읽어보시고 자유롭게 의견 남겨주세요:)
(참고로 중복되는 수정사항은 헷갈리실까봐 다시 안적어놨으니 참고 부탁드릴게요!)
enum Type { | ||
STUDY | ||
PROJECT | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥝 음 "활동 종류"를 위한 enum의 네이밍이니깐 ActivityType
같은건 어떤가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아요!
id Int @id @default(autoincrement()) | ||
type Type | ||
createdAt DateTime @default(now()) | ||
updatedAt DateTime? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍌 updatedAt
도 처음에는 createdAt
이랑 같은 값을 가지고, 이후에 변경될 때마다 업데이트 되어야하니깐 createdAt
과 마찬가지로 NOT NULL 속성을 가져야하는 것으로 알고 있어요!
그리고 매번 직접 업데이트하지 않고 편리하게 사용할 수 있도록 Prisma에서 @updateAt
이라는 속성을 제공해줍니다! (공식 문서)
updatedAt DateTime? | |
updatedAt DateTime @updatedAt |
type Type | ||
createdAt DateTime @default(now()) | ||
updatedAt DateTime? | ||
status String @default("ACTIVE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥝 status도 네이밍을 조금 직관적이게 deleted 같은거는 어떨까요?
그러면 기존의 status라는 이름으로 했을때는 enum으로 값을 관리해야 할 것 같은데 deleted로 하면 boolean형으로 비교적 간단하고 직관적으로 관리할 수 있을 것 같아서요!
만약 기존 네이밍을 유지한다면 위에서 말씀드렸던 것처럼 enum으로 값을 관리해야할 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지난번에 정했던 부분이긴 하지만 그때는 생각을 못했어가지구, 생각나서 말씀드립니다!ㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status enum으로 관리하는거 좋은 것 같습니다!
ActivityEnroll ActivityEnroll? | ||
Github Github? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍌 이 친구들 표기법이 PascalCase로 되어있는데 camelCase로 바꿔주는게 맞는 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 이부분 수정할게요!
Github Github? | ||
} | ||
|
||
model ActivityEnroll { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥝 이 테이블이 매핑 테이블임을 직관적으로 이해할 수 있도록 지난번에 정했던 이름인 ActivityMemberMapping
이 저는 괜찮다고 생각하는데,, 다른분들 의견도 궁금해요!
profileImgURL String @db.VarChar(300) | ||
githubURL String @db.VarChar(300) | ||
memberEmail String @db.VarChar(300) | ||
refreshToken String @db.VarChar(500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 이거 null 아닙니다 ㅜㅜ 제가 수정해놓을게요 죄송해요..!
ActivityEnroll ActivityEnroll? | ||
Github Github? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍎 Activity:ActivityEnroll = 1:n 인 점을 생각해보면, ActivityEnroll[]
으로 바꿔줘야 하는 것 같아요!
(Github도 마찬가지입니다!)
ActivityEnroll ActivityEnroll? | ||
MemberSeasonInfo MemberSeasonInfo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍎 여기도 1:n 관계인 점을 고려해서 타입 변경해줘야할 것 같습니다!
enum Role { | ||
LEAD | ||
CORE_MEMBER | ||
MEMBER | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥝 Role
네이밍을 확장성을 고려해서 MemberRole
이나 MemberRoleType
으로 변경하는건 어떤가요..?ㅎ
enum MemberSeasonInfo_memverPart { | ||
WEB_MOBILE | ||
SERVER_CLOUD | ||
AI | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍌 이름이 너무 길고 오타가 있는데, MemberPart
이나 MemberPartType
은 어떤가요?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Issue
Resolves #6
Description
DB 스키마 초안 작업을 해봤습니다! 부족한 점이 많아요! 보시고 많이 피드백 해주세요 😀
Check List
main
브랜치의 최신 상태를 반영하고 있는지 확인