diff --git a/src/offer/offer.service.ts b/src/offer/offer.service.ts index 1635848..bf2be9b 100644 --- a/src/offer/offer.service.ts +++ b/src/offer/offer.service.ts @@ -49,6 +49,7 @@ export class OfferService { image: messageImage, description: questionInfo.problem.description, questionId: questionId, + subTitle: `${questionInfo.problem.schoolLevel} ${questionInfo.problem.schoolSubject}`, }; const requestMessage = { text: '안녕하세요 선생님! 언제 수업 가능하신가요?', diff --git a/src/question/question.service.ts b/src/question/question.service.ts index 91dd633..ccddfa9 100644 --- a/src/question/question.service.ts +++ b/src/question/question.service.ts @@ -91,6 +91,7 @@ export class QuestionService { image: messageImage, description: createQuestionDto.description, questionId: questionId, + subTitle: `${createQuestionDto.schoolLevel} ${createQuestionDto.schoolSubject}`, }; console.log(createQuestionDto.requestTutoringStartTime); const requestMessage = { diff --git a/src/user/dto/create-user.dto.ts b/src/user/dto/create-user.dto.ts index 7739068..c76fa87 100644 --- a/src/user/dto/create-user.dto.ts +++ b/src/user/dto/create-user.dto.ts @@ -26,6 +26,12 @@ export class CreateUserDto { }) bio: string; + @ApiProperty({ + description: '사용자 프로필 이미지', + enum: ['dog', 'duck', 'fox', 'lion', 'penguin', 'polar_bear', 'tiger'], + }) + profileImg: string; + // @ApiProperty({ // description: 'The review list of the user.', // default: ['review1', 'review2'], @@ -67,21 +73,22 @@ export class CreateTeacherDto extends CreateUserDto { }) schoolName: string; - @ApiProperty({ - description: '선생님의 소속 단과대', - example: '사범대학', - }) - schoolDivision: string; - @ApiProperty({ description: '선생님의 학과', example: '수학교육과', }) schoolDepartment: string; + /* @ApiProperty({ + description: '선생님의 소속 단과대', + example: '사범대학', + }) + schoolDivision: string; + + @ApiProperty({ description: '선생님의 학년', example: 3, }) - schoolGrade: number; + schoolGrade: number;*/ } diff --git a/src/user/entities/user.interface.ts b/src/user/entities/user.interface.ts index d5aff67..0e4b9c7 100644 --- a/src/user/entities/user.interface.ts +++ b/src/user/entities/user.interface.ts @@ -20,6 +20,6 @@ export interface User extends UserKey { name?: string; division?: string; department?: string; - grade: number; + grade?: number; }; } diff --git a/src/user/user.repository.ts b/src/user/user.repository.ts index 5847312..d8699be 100644 --- a/src/user/user.repository.ts +++ b/src/user/user.repository.ts @@ -24,9 +24,8 @@ export class UserRepository { following: [], id: userId, name: createUserDto.name, - profileImage: - 'https://short-tutoring.s3.ap-northeast-2.amazonaws.com/default/profile.png', - role, + profileImage: `https://short-tutoring.s3.ap-northeast-2.amazonaws.com/default/profile-img/ic_profile_${createUserDto.profileImg}.png`, + role: role, participatingChattingRooms: [], }; @@ -40,9 +39,7 @@ export class UserRepository { const createTeacherDto = createUserDto as CreateTeacherDto; user.school = { name: createTeacherDto.schoolName, - division: createTeacherDto.schoolDivision, department: createTeacherDto.schoolDepartment, - grade: createTeacherDto.schoolGrade, }; } @@ -246,7 +243,7 @@ export class UserRepository { profileImage: user.profileImage, role: user.role, school: user.school, - followersCount: user.followers.length, + followers: user.followers, followingCount: user.following.length, }; } diff --git a/src/user/user.service.ts b/src/user/user.service.ts index 90d4b01..9d96331 100644 --- a/src/user/user.service.ts +++ b/src/user/user.service.ts @@ -239,6 +239,9 @@ export class UserService { } } + /** + * 내가 팔로우한 선생님들을 가져옵니다. + */ async following(studentId: string) { try { return new Success(