Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
travel
Commits
be135196
Commit
be135196
authored
Jul 20, 2022
by
Yoon, Daeki
😅
Browse files
포스트 모델 옵션 변경
parent
d1179528
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/models/post.model.ts
View file @
be135196
...
@@ -2,11 +2,11 @@ import { model, Schema, Types } from "mongoose";
...
@@ -2,11 +2,11 @@ import { model, Schema, Types } from "mongoose";
export
interface
PostType
{
export
interface
PostType
{
title
:
string
;
title
:
string
;
text
?
:
string
;
text
:
string
;
theme
:
string
;
theme
:
string
;
city
:
string
;
city
:
string
;
user
?
:
Types
.
ObjectId
|
string
;
user
:
Types
.
ObjectId
|
string
;
date
?
:
Date
;
date
:
Date
;
counts
?:
number
;
counts
?:
number
;
}
}
...
@@ -35,6 +35,7 @@ const PostSchema = new Schema<PostType>({
...
@@ -35,6 +35,7 @@ const PostSchema = new Schema<PostType>({
},
},
counts
:
{
counts
:
{
type
:
Number
,
type
:
Number
,
default
:
0
,
},
},
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment