@@ -7,33 +7,46 @@ import { Matching } from './matching.entity';
7
7
import { PostLike } from './post-like.entity' ;
8
8
import { PostReport } from './post-report.entity' ;
9
9
import { ChatMessage } from './chat-message.entity' ;
10
+ import { ApiProperty } from '@nestjs/swagger' ;
10
11
11
12
@Entity ( 'User' )
12
13
export class User extends BaseEntity {
13
14
@Column ( { type : 'varchar' , length : 100 , nullable : true } )
15
+ @ApiProperty ( { description : '카카오 고유 ID' , example : '1234567890' } )
14
16
kakaoId ! : string | null ; // 카카오 고유 ID를 저장하는 필드
15
17
18
+ @ApiProperty ( { description : '네이버 고유 ID' , example : '1234567890' } )
16
19
@Column ( { type : 'varchar' , length : 100 , nullable : true } )
17
20
naverId ! : string | null ; // 네이버 고유 ID를 저장하는 필드
18
21
22
+ @ApiProperty ( { description : '이름' , example : '홍길동' } )
19
23
@Column ( { type : 'varchar' , length : 100 , nullable : true } )
20
24
name ! : string | null ;
21
25
26
+ @
ApiProperty ( { description :
'이메일' , example :
'[email protected] ' } )
22
27
@Column ( { type : 'varchar' , length : 100 , nullable : true } )
23
28
email ! : string | null ;
24
29
30
+ @ApiProperty ( { description : '닉네임' , example : '마이콜' } )
25
31
@Column ( { type : 'varchar' , length : 10 , nullable : true } )
26
32
nickname ! : string | null ;
27
33
34
+ @ApiProperty ( { description : '전화번호' , example : '010-1234-5678' } )
28
35
@Column ( { type : 'varchar' , length : 15 , nullable : true } )
29
36
phoneNumber ! : string | null ;
30
37
38
+ @ApiProperty ( {
39
+ description : '프로필 사진 URL' ,
40
+ example : 'https://naver.com/profile.jpg' ,
41
+ } )
31
42
@Column ( { type : 'text' , nullable : true } )
32
43
profilePictureUrl ! : string | null ;
33
44
45
+ @ApiProperty ( { description : '자기소개' , example : '안녕하세요' } )
34
46
@Column ( { type : 'varchar' , length : 100 , nullable : true } )
35
47
bio ! : string | null ;
36
48
49
+ @ApiProperty ( { description : '회원가입 시각' , example : '2021-08-01 00:00:00' } )
37
50
@Column ( 'datetime' )
38
51
joinedAt ! : Date ; // joinedAt는 datetime 타입
39
52
0 commit comments