diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 32a920c..4e37f90 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,15 +1,18 @@ -## πŸ› **버그 μ„€λͺ…** - +--- +name: 버그 이슈 ν…œν”Œλ¦Ώ +about: Bug 발견 μ‹œ 이λ₯Ό ν•΄κ²°ν•˜κΈ° μœ„ν•œ ISSUEλ₯Ό μž‘μ„±ν•΄μ£Όμ„Έμš”. +title: '' +labels: BUG +assignees: jintak0401, pyo-sh, seoko97 +--- +## πŸ› **버그 μ„€λͺ…** ## 🚦 **μ œμ‹œ ν˜Ήμ€ μš”μ²­ν•˜λŠ” ν•΄κ²° 방법** - - ## πŸŒ„ **μŠ€ν¬λ¦°μƒ·** - \ No newline at end of file +---> diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c2cfc99..04fafb1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,15 +1,13 @@ --- -name: feature issue template -about: Create about new feature +name: κΈ°λŠ₯ μΆ”κ°€ ν…œν”Œλ¦Ώ +about: ν”„λ‘œμ νŠΈμ— μƒˆλ‘œμš΄ κΈ°λŠ₯을 μΆ”κ°€ν•  수 μžˆλ„λ‘ ISSUEλ₯Ό μž‘μ„±ν•΄μ£Όμ„Έμš” title: '' -labels: feature -assignees: +labels: '' +assignees: '' --- ## :briefcase: **κ΅¬ν˜„ κ°œμš”** - - ## :white_check_mark: **진행 κ³„νš 및 ν˜„ν™©** -- [ ] +- [ ] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 087df4d..e8bb1ce 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -* Closes #이슈번호 +- Closes #이슈번호 ## ✨ **κ΅¬ν˜„ κΈ°λŠ₯ λͺ…μ„Έ** @@ -6,4 +6,4 @@ ## 😭 **μ–΄λ €μ› λ˜ 점** -## πŸŒ„ **μŠ€ν¬λ¦°μƒ·** \ No newline at end of file +## πŸŒ„ **μŠ€ν¬λ¦°μƒ·** diff --git a/README.md b/README.md index 526d2d2..39b588e 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,127 @@ -# Nest JS Boilerplate +

+
+ Plandar +
+ Plandar +
+

-## μš”μ²­ URL +

μ‚¬μš©μž 별 개인 일정 관리 κΈ°λŠ₯이 μžˆλŠ” 달λ ₯ μ›Ή μ„œλΉ„μŠ€

-prefix둜 `/api`λ₯Ό λΆ™μž…λ‹ˆλ‹€. +

+
+ + + Notion docs Β» + + +
+

-## Http Exception Filter +

+ Contributors β€’ + Key Features β€’ + How To Use β€’ + Credits β€’ + Related +

-μš”μ²­ μ‹€νŒ¨μ‹œ μ•„λž˜ ν˜•μ‹μœΌλ‘œ μ‘λ‹΅ν•©λ‹ˆλ‹€. +
+ +
-``` -{ - success: false, - timestamp: "2023-02-22T06:25:08.663Z", - statusCode: 404, - message: "Cannot GET /", - error: "Not Found" -} -``` +## Contributors πŸ™‹πŸΌβ€β™‚οΈ -## Success Interceptor + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + μ§€μ„ν˜Έ + + + + + + ν‘œμ„ν›ˆ + + + + + + ν•œμ§„νƒ + + +
-μš”μ²­ μ„±κ³΅μ‹œ μ•„λž˜ ν˜•μ‹μœΌλ‘œ μ‘λ‹΅ν•©λ‹ˆλ‹€. +## Key Features βš’οΈ +- μ›ν•˜λŠ” λ‚ μ§œμ˜ 달λ ₯을 λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€. + - 일간, μ£Όκ°„, μ›”κ°„ 달λ ₯ μ œκ³΅ν•©λ‹ˆλ‹€. + - μ‚¬μ΄λ“œλ°”μ™€ 헀더λ₯Ό 톡해 달λ ₯을 μ œμ–΄ν•  수 μžˆμŠ΅λ‹ˆλ‹€. +- 일정을 μΆ”κ°€ν•˜μ—¬ 관리할 수 μžˆμŠ΅λ‹ˆλ‹€. + - 일정을 달λ ₯μ—μ„œ λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€. + - 일정에 λŒ€ν•œ λ©”λͺ¨λ₯Ό 남길 수 μžˆμŠ΅λ‹ˆλ‹€. +- λ“œλž˜κ·Έλ₯Ό 톡해 일정을 생성 및 μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€. +- μΉ΄ν…Œκ³ λ¦¬ κΈ°λŠ₯을 μ΄μš©ν•΄ λΉ„μŠ·ν•œ 일정을 ν•œλ²ˆμ— 관리할 수 μžˆμŠ΅λ‹ˆλ‹€. +- νƒœκ·Έ κΈ°λŠ₯을 μ΄μš©ν•΄ 일정 필터링을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. + +## How To Use βš™οΈ + +μ–΄ν”Œλ¦¬μΌ€μ΄μ…˜μ„ μ‹€ν–‰ν•˜κΈ° μœ„ν•΄μ„  [Git](https://git-scm.com)κ³Ό [Node.js](https://nodejs.org/en/download/) ([npm](http://npmjs.com)) 을 μ„€μΉ˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. + +이후 μ•„λž˜μ˜ λͺ…λ Ήμ–΄λ₯Ό 톡해 μ‹€ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€. + +```bash +# Clone this repository +$ git clone https://github.com/JiPyoTak/plandar-server + +# Go into the repository +$ cd plandar-server + +# Install dependencies +$ npm install + +# Run the app +$ npm start ``` -{ - success: true, - data: "Hello World!" -} -``` + +> **Note** +> +> 1. 이 μ–΄ν”Œλ¦¬μΌ€μ΄μ…˜μ„ μ •μƒμ μœΌλ‘œ μ‹€ν–‰ν•˜λ €λ©΄ .env νŒŒμΌμ„ μƒμ„±ν•˜κ³  λ‚΄μš©μ„ κΈ°μž…ν•΄μ•Ό ν•©λ‹ˆλ‹€. +> 2. ꡬ글, 카카였 OAuth 섀정이 ν•„μš”ν•©λ‹ˆλ‹€. + +## Credits πŸ“š + +μ•„λž˜μ™€ 같은 μ˜€ν”ˆμ†ŒμŠ€ νŒ¨ν‚€μ§€λ₯Ό μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. + +- [Node.js](https://nodejs.org/) +- [NestJS](https://nestjs.com/) +- [mysql2](https://www.npmjs.com/package/mysql2) +- [typeORM](https://typeorm.io/?ref=arctype.com) +- [passport](https://www.passportjs.org/) + +## Related πŸ”— + +[plandar-client](https://github.com/JiPyoTak/plandar-client) - Plandar μ›Ή λ·°λ₯Ό μ œκ³΅ν•˜λŠ” μ–΄ν”Œλ¦¬μΌ€μ΄μ…˜ diff --git a/src/entities/category.entity.ts b/src/entities/category.entity.ts index 2591c8a..de75971 100644 --- a/src/entities/category.entity.ts +++ b/src/entities/category.entity.ts @@ -27,7 +27,7 @@ export class CategoryEntity extends DefaultEntity { color!: string; @ApiProperty() - @ManyToOne(() => UserEntity, { onDelete: 'CASCADE', cascade: true }) + @ManyToOne(() => UserEntity, { onDelete: 'CASCADE' }) @JoinColumn({ name: 'user_id' }) user!: UserEntity; diff --git a/src/entities/plan.entity.ts b/src/entities/plan.entity.ts index d25550c..43aac30 100644 --- a/src/entities/plan.entity.ts +++ b/src/entities/plan.entity.ts @@ -105,7 +105,7 @@ export class PlanEntity extends DefaultEntity { @IsNumber() userId!: number; - @ManyToOne(() => UserEntity, { onDelete: 'CASCADE', cascade: true }) + @ManyToOne(() => UserEntity, { onDelete: 'CASCADE' }) @JoinColumn({ name: 'user_id' }) user!: UserEntity; @@ -116,7 +116,9 @@ export class PlanEntity extends DefaultEntity { @IsNumber() categoryId?: number; - @ManyToOne(() => CategoryEntity, (category) => category.plans) + @ManyToOne(() => CategoryEntity, (category) => category.plans, { + onDelete: 'SET NULL', + }) @JoinColumn({ name: 'category_id' }) category?: CategoryEntity;