-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat : AddSpace 엔티티에 스페이스 생성 시 필요한 representativeName 컬럼 추가 (#165) * feat : AddSpaceRepository에 저장 메소드 생성 (#165) * modify : ExceptionHandler 메소드에 에러로그 추가 (#165) * chore : FileBlock 메소드간 개행 추가 (#165) * feat : SpaceController에 저장메소드 구현 및 토큰에서 memberId 가져오도록 수정 (#165) * feat : SpaceSaveRequest 생성 (#165) * feat : SpaceSaveResponse 생성 (#165) * feat : SpaceService에 스페이스 저장 메소드 구현 (#165) * feat : SpaceType에 String에서 Enum타입으로 변환하는 메소드 추가 (#165) * modify : 더미데이터 수정 (#165) - member테이블에 password를 인코딩된 값으로 수정 - add_space테이블에 representative_name 컬럼 추가
- Loading branch information
Showing
10 changed files
with
158 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/com/javajober/space/dto/request/SpaceSaveRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.javajober.space.dto.request; | ||
|
||
import com.javajober.member.domain.Member; | ||
import com.javajober.space.domain.AddSpace; | ||
import com.javajober.space.domain.SpaceType; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class SpaceSaveRequest { | ||
|
||
private Long memberId; | ||
private String spaceTitle; | ||
private String representativeName; | ||
private String spaceType; | ||
|
||
public SpaceSaveRequest() { | ||
} | ||
|
||
public static AddSpace toEntity(SpaceSaveRequest request, Member member) { | ||
return AddSpace.builder() | ||
.spaceTitle(request.getSpaceTitle()) | ||
.spaceType(SpaceType.findSpaceTypeByString(request.getSpaceType())) | ||
.representativeName(request.getRepresentativeName()) | ||
.member(member) | ||
.build(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/javajober/space/dto/response/SpaceSaveResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.javajober.space.dto.response; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public class SpaceSaveResponse { | ||
|
||
private Long spaceId; | ||
|
||
public SpaceSaveResponse() { | ||
} | ||
|
||
public SpaceSaveResponse(Long spaceId) { | ||
this.spaceId = spaceId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,48 @@ | ||
INSERT INTO member(member_name, member_email, password, phone_number, member_ship, created_at, updated_at, deleted_at) | ||
VALUES ('변백현', '[email protected]', '1234', '010-1175-1312', 'FREE', NOW(), NOW(), NULL), | ||
('이수민', '[email protected]', '1234', '010-1135-2486', 'FREE', NOW(), NOW(), NULL), | ||
('김영희', '[email protected]', '1234', '010-1158-3741', 'FREE', NOW(), NOW(), NULL), | ||
('정민준', '[email protected]', '1234', '010-1179-4285', 'STANDARD', NOW(), NOW(), NULL), | ||
('박지영', '[email protected]', '1234', '010-1136-5279', 'FREE', NOW(), NOW(), NULL), | ||
('최우진', '[email protected]', '1234', '010-1157-6384', 'FREE', NOW(), NOW(), NULL), | ||
('한지훈', '[email protected]', '1234', '010-1178-7942', 'STANDARD', NOW(), NOW(), NULL), | ||
('서예진', '[email protected]', '1234', '010-1139-8425', 'FREE', NOW(), NOW(), NULL), | ||
('윤다미', '[email protected]', '1234', '010-6012-4904', 'FREE', NOW(), NOW(), NULL), | ||
('이하빈', '[email protected]', '1234', '010-6123-6015', 'STANDARD', NOW(), NOW(), NULL), | ||
('박서인', '[email protected]', '1234', '010-6234-7126', 'FREE', NOW(), NOW(), NULL), | ||
('최지안', '[email protected]', '1234', '010-6345-8237', 'FREE', NOW(), NOW(), NULL), | ||
('김하늘', '[email protected]', '1234', '010-6456-9348', 'FREE', NOW(), NOW(), NULL), | ||
('윤하나', '[email protected]', '1234', '010-6567-0459', 'FREE', NOW(), NOW(), NULL), | ||
('이서하', '[email protected]', '1234', '010-6678-1560', 'FREE', NOW(), NOW(), NULL), | ||
('박다은', '[email protected]', '1234', '010-6789-2671', 'FREE', NOW(), NOW(), NULL), | ||
('최수하', '[email protected]', '1234', '010-6890-3782', 'FREE', NOW(), NOW(), NULL), | ||
('김지하', '[email protected]', '1234', '010-6901-4893', 'FREE', NOW(), NOW(), NULL); | ||
VALUES ('변백현', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1175-1312', 'FREE', NOW(), NOW(), NULL), | ||
('이수민', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1135-2486', 'FREE', NOW(), NOW(), NULL), | ||
('김영희', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1158-3741', 'FREE', NOW(), NOW(), NULL), | ||
('정민준', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1179-4285', 'STANDARD', NOW(), NOW(), NULL), | ||
('박지영', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1136-5279', 'FREE', NOW(), NOW(), NULL), | ||
('최우진', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1157-6384', 'FREE', NOW(), NOW(), NULL), | ||
('한지훈', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1178-7942', 'STANDARD', NOW(), NOW(), NULL), | ||
('서예진', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-1139-8425', 'FREE', NOW(), NOW(), NULL), | ||
('윤다미', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6012-4904', 'FREE', NOW(), NOW(), NULL), | ||
('이하빈', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6123-6015', 'STANDARD', NOW(), NOW(), NULL), | ||
('박서인', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6234-7126', 'FREE', NOW(), NOW(), NULL), | ||
('최지안', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6345-8237', 'FREE', NOW(), NOW(), NULL), | ||
('김하늘', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6456-9348', 'FREE', NOW(), NOW(), NULL), | ||
('윤하나', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6567-0459', 'FREE', NOW(), NOW(), NULL), | ||
('이서하', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6678-1560', 'FREE', NOW(), NOW(), NULL), | ||
('박다은', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6789-2671', 'FREE', NOW(), NOW(), NULL), | ||
('최수하', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6890-3782', 'FREE', NOW(), NOW(), NULL), | ||
('김지하', '[email protected]', '$2a$10$RdYW3w/9DZ/hU.Nklx1RyOy5RC7yNqQk0JqIZXtw6HorY3Trkch86', '010-6901-4893', 'FREE', NOW(), NOW(), NULL); | ||
// password : abcd1234@ | ||
|
||
INSERT INTO add_space (space_title, space_type, representative_name, member_id, created_at, updated_at, deleted_at) | ||
VALUES ('변백현', 'PERSONAL','변백현', 1, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION','변백현', 1, NOW(), NOW(), NULL), | ||
('이수민', 'PERSONAL','이수민', 2, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION','이수민', 2, NOW(), NOW(), NULL), | ||
('김영희', 'PERSONAL','김영희', 3, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION','김영희', 3, NOW(), NOW(), NULL), | ||
('정민준', 'PERSONAL', '정민준', 4, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION','정민준', 4, NOW(), NOW(), NULL), | ||
('박지영', 'PERSONAL', '박지영', 5, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION','박지영', 5, NOW(), NOW(), NULL), | ||
('최우진', 'PERSONAL', '최우진', 6, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', '최우진', 6, NOW(), NOW(), NULL), | ||
('한지훈', 'PERSONAL', '한지훈', 7, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', '한지훈', 7, NOW(), NOW(), NULL), | ||
('서예진', 'PERSONAL', '서예진', 8, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', '서예진', 8, NOW(), NOW(), NULL), | ||
('윤다미', 'PERSONAL', '윤다미', 9, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', '윤다미', 9, NOW(), NOW(), NULL), | ||
('이하빈', 'PERSONAL','이하빈', 10, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION','이하빈', 10, NOW(), NOW(), NULL), | ||
('패스트캠퍼스 X Jober', 'ORGANIZATION','변백현', 1, NOW(), NOW(), NULL), | ||
('근로계약서', 'ORGANIZATION','이수민', 2, NOW(), NOW(), NULL); | ||
|
||
INSERT INTO add_space (space_title, space_type, member_id, created_at, updated_at, deleted_at) | ||
VALUES ('변백현', 'PERSONAL', 1, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 1, NOW(), NOW(), NULL), | ||
('이수민', 'PERSONAL', 2, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 2, NOW(), NOW(), NULL), | ||
('김영희', 'PERSONAL', 3, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 3, NOW(), NOW(), NULL), | ||
('정민준', 'PERSONAL', 4, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 4, NOW(), NOW(), NULL), | ||
('박지영', 'PERSONAL', 5, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 5, NOW(), NOW(), NULL), | ||
('최우진', 'PERSONAL', 6, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 6, NOW(), NOW(), NULL), | ||
('한지훈', 'PERSONAL', 7, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 7, NOW(), NOW(), NULL), | ||
('서예진', 'PERSONAL', 8, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 8, NOW(), NOW(), NULL), | ||
('윤다미', 'PERSONAL', 9, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 9, NOW(), NOW(), NULL), | ||
('이하빈', 'PERSONAL', 10, NOW(), NOW(), NULL), | ||
('임시회사명', 'ORGANIZATION', 10, NOW(), NOW(), NULL), | ||
('패스트캠퍼스 X Jober', 'ORGANIZATION', 1, NOW(), NOW(), NULL), | ||
('근로계약서', 'ORGANIZATION', 1, NOW(), NOW(), NULL); | ||
|
||
INSERT INTO member_group (member_hashtag_type, account_type, add_space_id, member_id, created_at, updated_at, | ||
deleted_at) | ||
|