Skip to content

Commit

Permalink
�v2.0.0
Browse files Browse the repository at this point in the history
* [FEAT] 모임 게시글 단일 조회 및 모임 게시글 개수 조회 V2 API 구현 (#275)

* [FEAT] 모임 게시글 단건 조회 API 마이그레이션 (#230)

* [FEAT] 모임 게시글 개수 조회 API 마이그레이션 (#230)

* [FEAT] 모임 게시글 개수 조회 API 테스트 코드 작성 (#230)

* [CHORE] nest.js swagger 에서 deprecated 처리 (#230)

* [DOCS] 스웨거 문서 작성 (#277)

* fix: ReplyDto 구현 (#281)

* [DOCS] README 수정

* fix: 스웨거 문서 수정 (#283)

* fix: 좋아요 여부 로직 수정 (#285)

* feat: 임시 API 개발 (#287)

* [FEAT] 모임 게시글 삭제 V2 API 구현 (#279)

* [FEAT] 모임 게시글 삭제 API 마이그레이션 (#278)

* [FIX] 모임 게시글 단건 조회 시, 없는 게시글 id의 경우 예외처리 (#230)

* [CHORE] Nest.js swagger 문서에서 v1 deprecated 처리(#278)

* chore: 댓글, 좋아요 삭제 로직 추가

* fix: delete 순서 변경

---------

Co-authored-by: mikekks <[email protected]>

* �[CHORE] 페이지네이션 메타데이터 추가 (#290)

* chore: 페이지네이션 메타 데이터 추가

* chore: Deprecated 처리

* [FEAT] 게시글 댓글 좋아요 토글 V2 API 구현 (#288)

* [FEAT] 게시글 댓글 좋아요 기능 추가

* [FEAT] 게시글 댓글 좋아요 변경 시 댓글 `likeCount` 변경

* [DOCS] 게시글 댓글 좋아요 V1 API에 Deprecated 주석 추가

* add: 코드 포맷터 적용

---------

Co-authored-by: mikekks <[email protected]>

* fix: 댓글 삭제 후 조회 로직 오류 해결 (#292)

* fix: PUT 메서드 추가 (#294)

* fix: 스웨거 오류 해결 (#297)

* fix: 스웨거 오류 해결 (#299)

* fix: 스웨거 오류 해결

* [FEAT] 광고 조회 API 개발 (#302)

* feat: 광고 조회 dto 정의

* feat: 광고 조회 API 컨트롤러 개발

* feat: 광고 엔티티 추가

* feat: 광고 조회 서비스 로직 구현

* chore: 도커 파일 수정

* fix: 스웨거 오류 해결

* fix: 스웨거 오류 해결

* [CHORE] 업데이트 -> 생성시점으로 변경 (#304)

* chore: 업데이트 -> 생성시점으로 변경

* chore: 업데이트 -> 생성시점으로 변경

* chore: userId -> orgId로 변경

* [FIX] playgroundId -> orgId로 변경

* [ADD] 컬럼 설명 추가

* [CHORE] FE 요청에 맞게 수정 (#306)

* [CHORE] response 응답에 @NotNull 추가

* [CHORE] userId, orgId 주석 추가

* [CHORE] 광고 조회 API에 category 추가

* [CHORE] Enumerate 추가

* [DOCS] 스웨거 설명 추가

* [FEAT] 유저 관련 API 마이그레이션 (#308)

* [CHORE] v2로 이름 변경

* [CHORE] 패키지 위치 수정

* [FEAT] applies 객체 추가

* [ADD] Dto 정의

* [FEAT] 내가 만든 모임 조회 및 내가 신청한 모임 조회 기능 구현

* [DOCS] 내가 만든 모임 조회 및 내가 신청한 모임 조회 스웨거 추가

* [CHORE] deprecated 처리

* feat: 전체모임 검색 및 필터링 마이그레이션 (#310)

* chore: deprecated 처리

* add: Dto 정의

* add: Dto 정의

* feat: 모임 검색 필터링 로직 구현

* docs: 스웨거 추가

* feat: 전체 모임 검색 및 필터링 서비스 로직 구현

* fix: 타임 객체 의존성 수정

* [FEAT] 로그인/회원가입 마이그레이션 (#311)

* chore: deprecated 처리

* add: dto 추가

* feat: 플레이그라운드 서버와의 통신 구현

* feat: 로그인/회원가입 로직 구현

* feat: 로그인/회원가입 엔티티 로직 구현

* chore: jwt 로직 포맷팅 및 클레임 put 로직 수정

* chore: 플레이그라운드 관련 데이터 추가

* chore: ci-cd 시크릿값 통일

* chore: 프록시 루트 변경

* [FEAT] 모임 삭제 API 구현 (#313)

* chore: deprecated 처리

* chore: 패키지 구조 변경

* feat: 모임 삭제 로직 구현

* feat: 모임장 확인 로직 구현

* docs: 모임 삭제 스웨거 추가

* chore: 패키지 구조로 인한 변경

* docs: 주석 수정

* chore: deprecated 처리 (#315)

* [FEAT] 모임 수정 API 마이그레이션 (#317)

* docs: 스웨거 추가

* feat: 모임 수정 로직 구현

* chore: 가독성을 위한 수정

* test: 테스트 코드 수정

* chore: deprecated 처리

* [FEAT] 모임 지원자 상태 변경 API 마이그레이션 (#320)

* chore: deprecated 처리

* docs: 스웨거 추가

* feat: 모임 지원자 상태 변경 로직 구현

* feat: 이미 처리된 경우 검증 로직 추가

* feat: 정원 초과 검증 로직 추가

* [CHORE] 광고 조회 API 수정 (#323)

* chore: 광고 조회 단건 -> 리스트로 수정

* docs: 스웨거 문서 수정

* [FEAT] presignedUrl 생성 로직 구현 (#324)

* chore: yml 데이터 추가

* feat: pre-signed-url 생성 로직 구현

* chore: deprecated 처리

* add: csv 관련 dto 추가

* [FEAT] csv 파일 업로드 및 url 반환 로직 구현 (#325)

* add: notnull 추가

* feat: csv 파일 업로드 및 url 반환 로직 구현

* chore: deprecated 처리

* docs: presignedUrl 관련 스웨거 추가

* feat: 신청자 검색 쿼리 구현

* [FEAT] 모임 상세 조회 API 마이그레이션 (#326)

* chore: 매직 리터럴 -> 상수로 변경

* chore: deprecated 처리

* add: dto 추가

* feat: 모임 상세 조회 구현

* refactor: Time DI를 통한 의존성 최소화

* test: 엔티티 테스트 코드 작성

* fix: 이전 버전과 동일한 응답값으로 변경

* [FEAT] 모임 게시글 수정 V2 API 구현 (#327)

* [FEAT] controller 코드 구현

* [FEAT] 엔티티 내 update 메서드 구현

* [ADD] 관련 dto 추가

* [FEAT] service 단 코드 구현

* [TEST] 테스트 코드 작성

* [CHORE] .gitignore 파일 수정

* [CHORE] nest.js 서버 스웨거 deprecated 처리

* [TEST] 댓글 관련 테스트 코드에서 누락된 meeting 정보 추가

* [CHORE] csv 파일 다운로드 로직 수정 (#330)

* chore: 모임 상태 설명 추가

* chore: 협업을 위한 스웨거 수정

* chore: 신청 상태 컬럼 추가

* chore: temp API 추가

* docs: 스웨거 기존과 동일하게 수정 (#331)

* refactor: 예외 응답 개선 (#335)

* [FEAT] 게시글 좋아요 토글 및 게시글 신고 API V2 구현 (#336)

* [FEAT] 모임 게시글 신고 api Controller 단 코드 구현

* [ADD] 모임 게시글 신고 api 관련 dto 추가

* [FEAT] 모임 게시글 신고 api Controller 단 코드 수정

* [FIX] Report 엔티티 연관관계 수정

* [FIX] 수정된 Report 엔티티에 맞게 댓글 신고 로직 수정

* [FEAT] 모임 게시글 신고 관련 service단 로직 구현

* [ADD] 모임 게시글 신고 관련 에러 메세지 추가

* [TEST] 모임 게시글 수정 테스트 코드 작성 및 댓글 신고 테스트 코드 수정

* [CHORE] 모임 게시글 신고 API nest.js 스웨거 deprecated 처리

* [FEAT] Like 엔티티 연관관계 수정 및 레포지토리 코드 구현

* [FEAT] 모임 게시글 좋아요 토글 api Controller 단 코드 구현

* [ADD] 모임 게시글 좋아요 토글 api 관련 dto 추가

* [FEAT] Post 엔티티 내에 likeCount 컬럼 업데이트 메서드 구현

* [FEAT] 모임 게시글 좋아요 토글 api Service 단 코드 구현

* [FIX] Like 엔티티 변경에 따른 commentService 로직 수정

* [TEST] 모임 게시글 좋아요 토글 api 테스트 코드 구현

* [CHORE] 모임 게시글 좋아요 토글 API nest.js 스웨거 deprecated 처리

* chore: 포맷터 적용

* chore: 포맷터 적용

---------

Co-authored-by: mikekks <[email protected]>

* fix: 트랜잭션 적용

* chore: 하나의 광고 이미지가 하나의 링크에 매핑되도록 수정 (#338)

* chore: 변수명 수정 (#340)

* add: 코드 포맷터 추가 (#342)

* �docs: 리드미 업데이트

* chore: 페이지네이션 방식 변경

* chore: 페이지네이션 방식 변경

* chore: spring validation 추가

* refactor: 모임 배너 조회 로직 개선 (#347)

* feat: Map 방어 코드 작성

* refactor: 배너 조회 로직 쿼리 개선

* setting: 릴리즈 노트 자동화 설정

---------

Co-authored-by: Yeseul Jo <[email protected]>
Co-authored-by: YeongWoooo <[email protected]>
  • Loading branch information
3 people committed Aug 31, 2024
2 parents 5236f8f + e4668ee commit 70d7a62
Show file tree
Hide file tree
Showing 170 changed files with 6,300 additions and 1,220 deletions.
38 changes: 38 additions & 0 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🎁 새로운 기능이 추가되었어요'
labels: ['🎁 feature']
- title: '🐞 기존 버그가 수정되었어요'
labels: ['🐞 fix']
- title: '🐬 코드를 개선했어요'
labels:
- '🛠️ refactor'
- '🧪 test'
- '🪛 chore'
- title: '⚙️ 프로젝트를 개선했어요'
labels:
- '🪄 setting'
- '📚 documentation'
- '🏭 environment'
- title: '🚀 배포'
labels:
- '🚀 deployment'

change-template: '- $TITLE #$NUMBER @$AUTHOR '
template: |
## 이번 버전의 변경사항은 아래와 같아요
---
$CHANGES
no-changes-template: '변경사항이 없어요'
version-resolver:
major:
labels:
- '1️⃣ major'
minor:
labels:
- '2️⃣ minor'
patch:
labels:
- '3️⃣ patch'
default: patch
2 changes: 1 addition & 1 deletion .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_DEV }}" > ./main/src/main/resources/application-secret.properties
echo "${{ secrets.APPLICATION_SECRET_SPRING }}" > ./main/src/main/resources/application-secret.properties
shell: bash

- name: Docker hub에 로그인
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_PROD }}" > ./main/src/main/resources/application-secret.properties
echo "${{ secrets.APPLICATION_SECRET_SPRING }}" > ./main/src/main/resources/application-secret.properties
shell: bash

- name: Docker hub에 로그인
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_DEV }}" > ./main/src/main/resources/application-secret.properties
echo "${{ secrets.APPLICATION_SECRET_SPRING }}" > ./main/src/main/resources/application-secret.properties
shell: bash

- name: Build and analyze (SpringBoot)
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter
on:
push:
branches:
- main
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter-config.yml
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
78 changes: 29 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,7 @@
# 설명

- NestJS기반으로 운영되는 모임(Crew) 서버
- Spring 기반으로 운영되는 모임(Crew) 서버
- [PlayGround Link](https://playground.sopt.org/group/)
- [PlayGround Dev Link](https://sopt-internal-dev.pages.dev/group/)

## node_modules 설치

```bash
npm ci
```

## 실행하는 법

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## 테스트

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

# 배경

Expand All @@ -45,23 +12,22 @@ $ npm run test:cov
# 기술스택

- DB: PostgreSQL
- DB GUI tool: pgAdmin4
- ORM: TypeORM
- ORM: jpa, TypeORM
- API 문서: Swagger
- 배포: AWS EC2, Docker Compose
- 배포: AWS EC2, Docker Compose, Docker hub
- 인증: JWT
- 테스트: Jest, Unit5
- 서버 프레임워크: NestJS, Spring
- 테스트: JUnit5, Jest
- 서버 프레임워크: Spring, NestJS
- 웹서버 프레임워크: Caddy
- 언어: typescript, Java
- 언어: Java, Typescript

# 아키텍처

## flow

1. Caddy를 통해 HTTPS를 적용하고, HTTP로 들어오는 요청을 HTTPS로 리다이렉트한다.
2. HTTPS로 들어온 요청을 Caddy가 받아서, Caddy는 요청을 받은 후에 해당 요청을 NodeJS/Spring 서버로 리버스프록시한다.
3. NodeJS/Spring 서버는 요청을 받아서, 요청에 맞는 Controller를 찾아서 해당 Controller에서 Service를 호출한다.
2. HTTPS로 들어온 요청을 Caddy가 받아서, Caddy는 요청을 받은 후에 해당 요청을 NestJS/Spring 서버로 리버스프록시한다.
3. NestJS/Spring 서버는 요청을 받아서, 요청에 맞는 Controller를 찾아서 해당 Controller에서 Service를 호출한다.
4. Service에서 로직을 처리한 후에, Repository를 통해 DB에 접근한다.
5. Repository는 DB에 접근해서 데이터를 가져온 후에, Service에게 데이터를 전달한다.
6. Service는 Repository로부터 받은 데이터를 가공해서 Controller에게 전달한다.
Expand All @@ -71,7 +37,7 @@ $ npm run test:cov

```bash
.
├── Dockerfile # docker로 배포할 때 사용하는 파일. 현재는 사용하지 않음
├── Dockerfile
├── jest.config.ts
├── nest-cli.json
├── package-lock.json
Expand Down Expand Up @@ -161,7 +127,7 @@ bar # 예시 모듈
## 환경 변수

- 환경 변수는 dev/prod 환경에 따라 다르게 설정되어야 한다.
- Nestjs
- NestJS
- dev 환경: .dev.env
- prod 환경: .prod.env
- Spring
Expand All @@ -187,16 +153,17 @@ bar # 예시 모듈

## 배포 전략

- 현재는 수동배포를 진행중이고 Blue-Green 방식의 배포를 진행하고 있지 않는다.
- 수동배포 이후 짧은 순단(서버 재시작)이 발생하기 때문에 새벽에 배포를 하거나, 사용자가 몰리는 시간대는 피해서 배포를 진행한다. (Prod환경 기준)
- Blue-Green 방식의 배포 자동화를 구축했다.
- 그럼에도 불구하고, 사용자가 몰리는 시간대는 피해서 배포를 진행한다. (Prod환경 기준)
- Prod환경의 경우는 `main` 브랜치를, Dev환경의 경우는 `develop` 브랜치를 기준으로 배포를 진행한다.

## 배포 정보

- 배포 서버: AWS EC2
- 배포 툴: Docker Compose

## 배포 방법
## 수동 배포 방법
- 현재는 배포 자동화가 되어있다.

```bash
# Prod 배포
Expand Down Expand Up @@ -229,6 +196,19 @@ $ sudo docker image prune
7. 리뷰를 받은 후에 PR을 develop에 merge한다.
8. develop에 merge된 후에 develop환경 배포를 진행한다.

## 커밋 컨벤션
## 🙏 Commit Convention
- <a href="https://udacity.github.io/git-styleguide/">유다시티 컨벤션

```
feat: 새로운 기능 구현
add: 기능구현까지는 아니지만 새로운 파일이 추가된 경우
del: 기존 코드를 삭제한 경우
fix: 버그, 오류 해결
docs: README나 WIKI 등의 문서 작업
style: 코드가 아닌 스타일 변경을 하는 경우
refactor: 리팩토링 작업
test: 테스트 코드 추가, 테스트 코드 리팩토링
chore: 코드 수정, 내부 파일 수정
```

TBD
## 기여
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ services:
caddy.route_9.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_10: /notice/v2
caddy.route_10.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_11: /advertisement/v2
caddy.route_11.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_12: /advertisement/v2/*
caddy.route_12.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_13: /auth/v2
caddy.route_13.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_14: /auth/v2/*
caddy.route_14.reverse_proxy: "{{ upstreams 4000 }}"

nestjs-blue:
image: makerscrew/server:latest
Expand Down Expand Up @@ -241,6 +249,14 @@ services:
caddy.route_9.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_10: /notice/v2
caddy.route_10.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_11: /advertisement/v2
caddy.route_11.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_12: /advertisement/v2/*
caddy.route_12.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_13: /auth/v2
caddy.route_13.reverse_proxy: "{{ upstreams 4000 }}"
caddy.route_14: /auth/v2/*
caddy.route_14.reverse_proxy: "{{ upstreams 4000 }}"

networks:
caddy:
Expand Down
2 changes: 2 additions & 0 deletions main/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ out/
.vscode/

application-secret.properties

.DS_Store
7 changes: 7 additions & 0 deletions main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.6.0'
implementation 'org.springframework.boot:spring-boot-starter-validation'

// jsonb 타입 핸들링 위함
implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.6.0'
Expand Down Expand Up @@ -71,6 +72,12 @@ dependencies {
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"

// AWS SDK for S3
implementation "software.amazon.awssdk:s3:2.27.0"

// csv 관련
implementation 'com.opencsv:opencsv:5.5.2'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@SpringBootApplication
@EnableAspectJAutoProxy
@EnableFeignClients
public class MainApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.sopt.makers.crew.main.advertisement;

import java.security.Principal;

import org.sopt.makers.crew.main.advertisement.dto.AdvertisementsGetResponseDto;
import org.sopt.makers.crew.main.entity.advertisement.enums.AdvertisementCategory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "광고")
public interface AdvertisementApi {
@Operation(summary = "광고 조회", description = "게시글 목록 페이지일 경우, ?category=POST <br /> 모임 목록 페이지일 경우, ?category=MEETING")
@ResponseStatus(HttpStatus.OK)
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "성공"),
})
ResponseEntity<AdvertisementsGetResponseDto> getAdvertisement(@RequestParam(name = "category", required = true) AdvertisementCategory category,
Principal principal);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.sopt.makers.crew.main.advertisement;

import java.security.Principal;

import org.sopt.makers.crew.main.advertisement.dto.AdvertisementsGetResponseDto;
import org.sopt.makers.crew.main.advertisement.service.AdvertisementService;
import org.sopt.makers.crew.main.entity.advertisement.enums.AdvertisementCategory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import lombok.RequiredArgsConstructor;

@RestController
@RequestMapping("/advertisement/v2")
@RequiredArgsConstructor
public class AdvertisementController implements AdvertisementApi {

private final AdvertisementService advertisementService;

@Override
@GetMapping
public ResponseEntity<AdvertisementsGetResponseDto> getAdvertisement(
@RequestParam(name = "category") AdvertisementCategory category,
Principal principal) {

AdvertisementsGetResponseDto response = advertisementService.getAdvertisement(category);

return ResponseEntity.ok().body(response);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.sopt.makers.crew.main.advertisement.dto;

import org.sopt.makers.crew.main.entity.advertisement.Advertisement;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@Getter
@Schema(name = "AdvertisementImageDto", description = "광고 구좌 이미지 Dto")
public class AdvertisementGetDto {

@Schema(description = "[Desktop] 광고 구좌 이미지 url", example = "[pc 버전 url 형식]")
@NotNull
private final String desktopImageUrl;

@Schema(description = "[mobile] 광고 구좌 이미지 url", example = "[mobile 버전 url 형식]")
@NotNull
private final String mobileImageUrl;

@Schema(description = "광고 구좌 링크", example = "https://www.naver.com")
@NotNull
private final String advertisementLink;

public static AdvertisementGetDto of(Advertisement advertisement) {
return new AdvertisementGetDto(advertisement.getAdvertisementDesktopImageUrl(),
advertisement.getAdvertisementMobileImageUrl(), advertisement.getAdvertisementLink());
}
}
Loading

0 comments on commit 70d7a62

Please sign in to comment.