Initial commit
This commit is contained in:
12
backend/models/Photo.js
Normal file
12
backend/models/Photo.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
const photoSchema = new mongoose.Schema(
|
||||
{
|
||||
url: { type: String, required: true },
|
||||
caption: { type: String },
|
||||
active: { type: Boolean, default: true },
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
module.exports = mongoose.model("Photo", photoSchema);
|
||||
Reference in New Issue
Block a user