31 lines
517 B
JavaScript
31 lines
517 B
JavaScript
import mongoose from 'mongoose'
|
|
|
|
const postSchema = new mongoose.Schema({
|
|
clerkUserID: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
date: {
|
|
type: Date
|
|
},
|
|
photo: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
notes: {
|
|
type: String
|
|
},
|
|
address: {
|
|
type: String
|
|
},
|
|
status: {
|
|
type: String,
|
|
enum: ['open', 'denied', 'approved'],
|
|
default: 'open'
|
|
}
|
|
})
|
|
|
|
const Post = mongoose.model('Post', postSchema)
|
|
|
|
export default Post
|