Skip to content

SOPT28th-SOPKATHON-Kick/Kick_Server

Repository files navigation

Kick_Server

서비스명 : ㅋick

서비스 한 줄 소개 : 밤에 누워서 생각나는 이불킥하고 싶은 순간을 유머스럽게 공유하는 커뮤니티형 플랫폼


Models

  • /models/Post.ts

    import mongoose from "mongoose"
    import { IPost } from "../interfaces/IPost"
    
    
    const PostSchema = new mongoose.Schema({
    
     _id:{
      type: mongoose.SchemaTypes.ObjectId,
     },
    
     kick_count:{
      type: Number,
      require: true,
     },
    
     timestamp:{
      type: Date,
      require: true,
     },
    
     contents:{
      type: String,
      require: true,
     },
    
     title: {
      type: String,
      require: true,
     },
    });
    
    
    export default mongoose.model<IPost & mongoose.Document>(
     "Post",
     PostSchema
    );
  • interfaces/IPost.ts

    import mongoose from "mongoose";
    
    
    
    export interface IPost {
     _id: mongoose.Types.ObjectId;
     kick_count: Number;
     timestamp: Date;
     contents: String;
     title: String;
    }

image

About

✨28th SOPT 솝커톤 서버 ㅋicker들⚽

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published