Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 61 additions & 1 deletion http/career/CarrerControllerHttpRequest.http
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Authorization: Bearer {{access_token}}


### 14.5 (μ–΄λ“œλ―Ό) 컀리어 μΆ”κ°€ν•˜κΈ°
###
//@no-log
POST http://localhost:8080/v1/admins/careers
Content-Type: multipart/form-data; boundary=boundary
Authorization: Bearer {{access_token}}
Expand Down Expand Up @@ -77,3 +77,63 @@ Authorization: Bearer {{access_token}}



### 14.7 (μ–΄λ“œλ―Ό) 컀리어 리슀트 쑰회
//@no-log
GET http://localhost:8080/v1/admins/careers/overviews?
page=1&
size=10&
sorting=TRENDING
Content-Type: application/json
Authorization: Bearer {{access_token}}



### 14.8 (μ–΄λ“œλ―Ό) 컀리어 λ””ν…ŒμΌ 쑰회
//@no-log
GET http://localhost:8080/v1/admins/careers/1/details
Content-Type: application/json
Authorization: Bearer {{access_token}}


### 14.9 (μ–΄λ“œλ―Ό) 컀리어 μˆ˜μ •ν•˜κΈ°
//@no-log
PUT http://localhost:8080/v1/admins/careers/1
Content-Type: multipart/form-data; boundary=boundary
Authorization: Bearer {{access_token}}

--boundary
Content-Disposition: form-data; name="image"; filename="image.png"
Content-Type: image/png

< /Users/jjuuuunnii/Desktop/image.png

--boundary
Content-Disposition: form-data; name="body"
Content-Type: application/json

{
"title": "μŠΉμ£Όλ‹ˆλž‘ λ™κ²Έμ΄μ˜ μŠ€ν”„λ§ μ—¬ν–‰",
"career_category": "PROGRAM",
"host_name": "ν•œκ΅­κΈ€λ‘œλ²Œν˜‘νšŒ",
"organizer_name": "μ„œμšΈμ²­λ…„μ„Όν„°",
"address": "μ„œμšΈ 강남ꡬ",
"recruitment_start_date": "2025-06-01",
"recruitment_end_date": "2025-06-30",
"reward": 500000,
"visa": ["D_2_2", "D_4_1", "F_2"],
"recruitment_number": 9,
"education": "BACHELOR",
"preferred_conditions": "μ™Έκ΅­μ–΄ λŠ₯ν†΅μž μš°λŒ€",
"details": "ν•΄μ™Έ 파견 인턴십 ν”„λ‘œκ·Έλž¨μœΌλ‘œ, κΈ€λ‘œλ²Œ κΈ°μ—…μ—μ„œ 싀무 κ²½ν—˜μ„ μŒ“μ„ 수 μžˆλŠ” κΈ°νšŒμž…λ‹ˆλ‹€.",
"application_url": "https://apply.globalinternship.kr",
"deleted_image_ids": [1]
}

--boundary



### 14.10 (μ–΄λ“œλ―Ό) 컀리어 μ‚­μ œν•˜κΈ°
//@no-log
DELETE http://localhost:8080/v1/admins/careers/2
Authorization: Bearer {{access_token}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.inglo.giggle.career.application.dto.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.inglo.giggle.career.domain.type.ECareerCategory;
import com.inglo.giggle.core.type.EEducationLevel;
import com.inglo.giggle.core.type.EVisa;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.util.List;
import java.util.Set;

public record UpdateAdminsCareerRequestDto(

@NotBlank(message = "title은 ν•„μˆ˜ μž…λ ₯ κ°’μž…λ‹ˆλ‹€.")
@JsonProperty("title")
String title,

@JsonProperty("career_category")
ECareerCategory careerCategory,

@JsonProperty("host_name")
String hostName,

@JsonProperty("organizer_name")
String organizerName,

@JsonProperty("address")
String address,

@JsonProperty("recruitment_start_date")
String recruitmentStartDate, // ISO 8601 ν˜•μ‹: "yyyy-MM-dd"

@JsonProperty("recruitment_end_date")
String recruitmentEndDate,

@JsonProperty("reward")
Integer reward,

@JsonProperty("visa")
Set<EVisa> visa,

@JsonProperty("recruitment_number")
Integer recruitmentNumber,

@NotNull
@JsonProperty("education")
EEducationLevel education,

@JsonProperty("preferred_conditions")
String preferredConditions,

@JsonProperty("details")
String details,

@NotBlank
@JsonProperty("application_url")
String applicationUrl,

@JsonProperty("delete_img_ids")
List<Long> deleteImgIds

) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package com.inglo.giggle.career.application.dto.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.inglo.giggle.career.domain.type.ECareerCategory;
import com.inglo.giggle.core.dto.SelfValidating;
import com.inglo.giggle.core.type.EEducationLevel;
import com.inglo.giggle.core.type.EVisa;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Getter;

import java.util.List;
import java.util.Set;

@Getter
public class ReadAdminsCareersDetailsResponseDto extends SelfValidating<ReadAdminsCareersDetailsResponseDto> {

@JsonProperty("imgs")
private final List<imgs> imgs;

@JsonProperty("title")
private final String title;

@JsonProperty("career_category")
private final ECareerCategory careerCategory; // nullable

@JsonProperty("host_name")
private final String hostName;

@JsonProperty("organizer_name")
private final String organizerName;

@JsonProperty("address")
private final String address;

@JsonProperty("recruitment_start_date")
private final String recruitmentStartDate;

@JsonProperty("recruitment_end_date")
private final String recruitmentEndDate;

@JsonProperty("reward")
private final Integer reward;

@JsonProperty("visa")
private final Set<EVisa> visa;

@JsonProperty("recruitment_number")
private final Integer recruitmentNumber;

@JsonProperty("education")
private final EEducationLevel education;

@JsonProperty("preferred_conditions")
private final String preferredConditions;

@JsonProperty("details")
private final String details;

@NotNull
@JsonProperty("application_url")
private final String applicationUrl;

@Builder
public ReadAdminsCareersDetailsResponseDto(
List<imgs> imgs,
String title,
ECareerCategory careerCategory,
String hostName,
String organizerName,
String address,
String recruitmentStartDate,
String recruitmentEndDate,
Integer reward,
Set<EVisa> visa,
Integer recruitmentNumber,
EEducationLevel education,
String preferredConditions,
String details,
String applicationUrl
) {
this.imgs = imgs;
this.title = title;
this.careerCategory = careerCategory;
this.hostName = hostName;
this.organizerName = organizerName;
this.address = address;
this.recruitmentStartDate = recruitmentStartDate;
this.recruitmentEndDate = recruitmentEndDate;
this.reward = reward;
this.visa = visa;
this.recruitmentNumber = recruitmentNumber;
this.education = education;
this.preferredConditions = preferredConditions;
this.details = details;
this.applicationUrl = applicationUrl;
this.validateSelf();
}

@Getter
public static class imgs extends SelfValidating<imgs> {

@JsonProperty("id")
@NotNull(message = "이미지 IDλŠ” ν•„μˆ˜μž…λ‹ˆλ‹€.")
private final Long id;

@JsonProperty("urls")
@NotNull(message = "이미지 URL은 ν•„μˆ˜μž…λ‹ˆλ‹€.")
private final String url;

@Builder
public imgs(Long id, String url) {
this.id = id;
this.url = url;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package com.inglo.giggle.career.application.dto.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.inglo.giggle.career.domain.type.ECareerCategory;
import com.inglo.giggle.career.domain.type.ERecruitmentStatus;
import com.inglo.giggle.core.dto.SelfValidating;
import com.inglo.giggle.core.type.EVisa;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Getter;

import java.util.List;

@Getter
public class ReadAdminsCareersOverviewsResponseDto extends SelfValidating<ReadAdminsCareersOverviewsResponseDto> {

@NotNull
@JsonProperty("career_list")
private final List<CareerOverviewDto> careerList;

@NotNull
@JsonProperty("has_next")
private final Boolean hasNext;

@Builder
public ReadAdminsCareersOverviewsResponseDto(List<CareerOverviewDto> careerList, Boolean hasNext) {
this.careerList = careerList;
this.hasNext = hasNext;
this.validateSelf();
}

@Getter
public static class CareerOverviewDto {

@NotNull
@JsonProperty("id")
private final Long id;

@NotNull
@JsonProperty("title")
private final String title;

@NotNull
@JsonProperty("career_category")
private final ECareerCategory careerCategory;

@NotNull
@JsonProperty("visa")
private final List<EVisa> visa;

@NotNull
@JsonProperty("host_name")
private final String hostName;

@NotNull
@JsonProperty("organizer_name")
private final String organizerName;

@NotNull
@JsonProperty("left_days")
private final String leftDays;

@NotNull
@JsonProperty("status")
private final ERecruitmentStatus status;

@NotNull
@JsonProperty("recruitment_start_date")
private final String recruitmentStartDate;

@NotNull
@JsonProperty("recruitment_end_date")
private final String recruitmentEndDate;

@NotNull
@JsonProperty("created_at")
private final String createdAt;

@Builder
public CareerOverviewDto(
Long id,
String title,
ECareerCategory careerCategory,
List<EVisa> visa,
String hostName,
String organizerName,
String leftDays,
ERecruitmentStatus status,
String recruitmentStartDate,
String recruitmentEndDate,
String createdAt
) {
this.id = id;
this.title = title;
this.careerCategory = careerCategory;
this.visa = visa;
this.hostName = hostName;
this.organizerName = organizerName;
this.leftDays = leftDays;
this.status = status;
this.recruitmentStartDate = recruitmentStartDate;
this.recruitmentEndDate = recruitmentEndDate;
this.createdAt = createdAt;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ public void execute(List<MultipartFile> images, CreateAdminsCareerRequestDto req

List<String> imageUrls;
if (images != null && !images.isEmpty()) {
UUID serialId = UUID.randomUUID();

imageUrls = images.stream().map(image -> s3Util.uploadImageFile(
image,
UUID.randomUUID().toString(),
serialId.toString(),
EImageType.CAREER_IMG
)).toList();

List<CareerImage> careerImages = imageUrls.stream()
.map(url -> CareerImage.builder()
.career(career)
.serialId(serialId)
.imgUrl(url)
.build())
.toList();
Expand Down
Loading