mainimg.model.ts 459 Bytes
Newer Older
백승민's avatar
백승민 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import {model, Schema } from "mongoose";

export interface MainimgType {

    theme: string;
    city: string;
    url: string;
    title: string;
}

const MainimgSchema = new Schema<MainimgType>({
    theme: {
        type: String,
    },
    city: {
        type: String,
    },
    url : {
        type: String,
    },
    title: {
        type: String,
        required: true,
    },
    
});

export default model<MainimgType>("Mainimg", MainimgSchema);