Commit c950832d authored by Lee Soobeom's avatar Lee Soobeom
Browse files

.

parent e7e56fda
import { model, Schema } from "mongoose";
export interface PostType {
id: string;
title: string;
date: Date;
body : string;
counts?: number;
theme: string;
city: string;
}
export interface PostType extends PostingType {
date?: string;
counts: number;
id?: string;
}
export interface PostingType {
title: string;
text?: string;
theme: string;
city: string;
username: string;
}
const schema = new Schema<PostType>({
id : {type: String},
title : { type: String },
date : {type: Date},
body : {type : String},
counts : {type: Number},
theme : {type: String},
city : {type: String},
id: { type: String },
title: { type: String },
date: { type: Date },
text: { type: String },
counts: { type: Number },
theme: { type: String },
city: { type: String },
username: { type: String },
});
export default model<PostType>("Post", schema);
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