codestates / codestates/Bobpago
[๐Dev Log] ๋ฐ์ฑํ / 2021-09-15
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### ์ค๋์ ์ด๋ป๊ฒ ํ๋ก์ ํธ์ ๊ธฐ์ฌํ๋์?
- NestJS ํ๋ ์์ํฌ๋ฅผ ์ด์ฉํ์ฌ ํ์ํ module, controller, service๋ฅผ ์ค์นํ์ฌ ๊ตฌ์ฑํ๋ค.
- ์์ฑํ๋ ์คํค๋ง ๋ชจ๋ธ์ ๊ธฐ๋ฐ์ผ๋ก ๊ฐ ํ
์ด๋ธ์ ํด๋นํ๋ Entity๋ฅผ ํ์ฑํ๋ค.
- TypeOrm์์ ์ง์ํ๋ ๋ฐ์ฝ๋ ์ดํฐ๋ก 1:N, 1:1 ๊ด๊ณํ์ฑ์ ์ค์ ํ๋ค. (FK)
### ์ค๋์ ํ๋ก์ ํธ์์ ํ๋ ์ ์ ๋ฌด์์ธ๊ฐ์?
- FK์ง์ ํ ๋ 1:N ๊ด๊ณ ๋ฐ์ฝ๋ ์ดํฐ ์์ฑํ๋ ๋ถ๋ถ์ด ์กฐ๊ธ ํท๊ฐ๋ ธ๋ค.
```ts
// recipe.entity.ts
@ManyToOne(() => User, (user) => user.recipes)
user: User;
```
```ts
// user.entity.ts
@OneToMany(() => Recipe, (recipe) => recipe.user)
recipes: Recipe[];
```
### ๋ด์ผ์ ํ๋ก์ ํธ์ ๊ธฐ์ฌํ๊ธฐ ์ํด ๋ฌด์์ ํด์ผ ํ๋์?
- [ ] ํ์๊ฐ์
api ์์ฑ
- [ ] class-validator๋ฅผ ์ด์ฉํ create-user DTO์ค์
- [ ] S3 ์ด๋ฏธ์ง ์
๋ก๋ ๊ณต๋ถ
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.