2025-07-30 16:24:09 -05:00
|
|
|
import mongoose from 'mongoose'
|
2025-07-25 16:33:34 -05:00
|
|
|
|
|
|
|
|
const postSchema = new mongoose.Schema({
|
2025-08-06 23:24:43 -05:00
|
|
|
clerkUserID: {
|
2025-07-26 13:06:35 -05:00
|
|
|
type: String,
|
2025-07-25 16:33:34 -05:00
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
date: {
|
2025-07-30 16:24:09 -05:00
|
|
|
type: Date
|
2025-07-25 16:33:34 -05:00
|
|
|
},
|
|
|
|
|
photo: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
notes: {
|
2025-07-30 16:24:09 -05:00
|
|
|
type: String
|
|
|
|
|
},
|
|
|
|
|
address: {
|
|
|
|
|
type: String
|
2025-07-25 16:33:34 -05:00
|
|
|
},
|
|
|
|
|
status: {
|
|
|
|
|
type: String,
|
2025-08-08 09:45:45 -05:00
|
|
|
enum: ['open', 'denied', 'approved'],
|
|
|
|
|
default: 'open'
|
2025-07-25 16:33:34 -05:00
|
|
|
}
|
2025-07-30 16:24:09 -05:00
|
|
|
})
|
2025-07-25 16:33:34 -05:00
|
|
|
|
2025-07-30 16:24:09 -05:00
|
|
|
const Post = mongoose.model('Post', postSchema)
|
2025-07-25 16:33:34 -05:00
|
|
|
|
2025-07-30 16:24:09 -05:00
|
|
|
export default Post
|