Skip to content

Commit 1a671b3

Browse files
committed
fix: user birthday
1 parent d6a7c6b commit 1a671b3

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

openapi.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"hash": "a9a86c65b13852f5820f588fd81c1e7d442f1c008afac8a379e75b2d2038257d",
2+
"hash": "e8fd95d0869a71d45e5f6e7414b888cdb9c6946139712e7c27682cb72bd2636a",
33
"openapi": "3.0.0",
44
"paths": {
55
"/hello": {
@@ -4399,6 +4399,11 @@
43994399
"type": "string",
44004400
"description": "头像"
44014401
},
4402+
"birthday": {
4403+
"format": "date-time",
4404+
"type": "string",
4405+
"description": "生日"
4406+
},
44024407
"data": {
44034408
"type": "string",
44044409
"description": "额外数据"
@@ -5899,6 +5904,11 @@
58995904
"type": "string",
59005905
"description": "头像"
59015906
},
5907+
"birthday": {
5908+
"format": "date-time",
5909+
"type": "string",
5910+
"description": "生日"
5911+
},
59025912
"data": {
59035913
"type": "string",
59045914
"description": "额外数据"
@@ -6009,6 +6019,11 @@
60096019
"type": "string",
60106020
"description": "头像"
60116021
},
6022+
"birthday": {
6023+
"format": "date-time",
6024+
"type": "string",
6025+
"description": "生日"
6026+
},
60126027
"data": {
60136028
"type": "string",
60146029
"description": "额外数据"

src/user/entities/user.entity.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ export class UserDoc {
2828
@Prop()
2929
avatar?: string;
3030

31+
/**
32+
* 生日
33+
*/
34+
@IsOptional()
35+
@IsDate()
36+
@Type(() => Date)
37+
@Prop()
38+
birthday?: Date;
39+
3140
/**
3241
* 额外数据
3342
*/

0 commit comments

Comments
 (0)