Download api/models/schema/projectSchema.js from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 771 Bytes
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/models/schema/projectSchema.js
- Command line
-
hf download hf://spaces/Zhitomir/chat/api/models/schema/projectSchema.js
-
curl -L -o projectSchema.js https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/models/schema/projectSchema.js
771 Bytes
| const { Schema } = require('mongoose'); | |
| /** | |
| * @typedef {Object} MongoProject | |
| * @property {ObjectId} [_id] - MongoDB Document ID | |
| * @property {string} name - The name of the project | |
| * @property {ObjectId[]} promptGroupIds - Array of PromptGroup IDs associated with the project | |
| * @property {Date} [createdAt] - Date when the project was created (added by timestamps) | |
| * @property {Date} [updatedAt] - Date when the project was last updated (added by timestamps) | |
| */ | |
| const projectSchema = new Schema( | |
| { | |
| name: { | |
| type: String, | |
| required: true, | |
| index: true, | |
| }, | |
| promptGroupIds: { | |
| type: [Schema.Types.ObjectId], | |
| ref: 'PromptGroup', | |
| default: [], | |
| }, | |
| }, | |
| { | |
| timestamps: true, | |
| }, | |
| ); | |
| module.exports = projectSchema; | |