Spaces:
Sleeping
Sleeping
Download backend/src/models/Image.js from monumkp89/pixelcraft: direct link, hf CLI and curl.
- Browser
- Download file 558 Bytes
-
https://huggingface.co/spaces/monumkp89/pixelcraft/resolve/main/backend/src/models/Image.js
- Command line
-
hf download hf://spaces/monumkp89/pixelcraft/backend/src/models/Image.js
-
curl -L -o Image.js https://huggingface.co/spaces/monumkp89/pixelcraft/resolve/main/backend/src/models/Image.js
558 Bytes
| const mongoose = require('mongoose'); | |
| const imageSchema = new mongoose.Schema({ | |
| userId: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: 'User', | |
| required: true, | |
| }, | |
| prompt: { | |
| type: String, | |
| required: true, | |
| trim: true, | |
| }, | |
| imageUrl: { | |
| type: String, | |
| required: true, | |
| }, | |
| ratio: { | |
| type: String, | |
| default: '1:1', | |
| }, | |
| quality: { | |
| type: String, | |
| default: 'balanced', | |
| }, | |
| generatedAt: { | |
| type: Date, | |
| default: Date.now, | |
| }, | |
| }); | |
| module.exports = mongoose.model('Image', imageSchema); | |