Commit be135196 authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

포스트 모델 옵션 변경

parent d1179528
...@@ -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,
}, },
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment