Download models/User.js from ismizo/CVBora: direct link, hf CLI and curl.
- Browser
- Download file 789 Bytes
-
https://huggingface.co/spaces/ismizo/CVBora/resolve/main/models/User.js
- Command line
-
hf download hf://spaces/ismizo/CVBora/models/User.js
-
curl -L -o User.js https://huggingface.co/spaces/ismizo/CVBora/resolve/main/models/User.js
789 Bytes
| const mongoose = require('mongoose'); | |
| const UserSchema = new mongoose.Schema({ | |
| email: { type: String, required: true, unique: true }, | |
| displayName: { type: String, default: '' }, | |
| provider: { type: String }, // 'google' or 'linkedin' | |
| providerId: { type: String }, | |
| // Usage Limits | |
| freeGenerationsUsed: { type: Number, default: 0 }, | |
| lastGenerationDate: { type: Date, default: Date.now }, | |
| // Paid Credits (via ClickPesa) | |
| paidCredits: { type: Number, default: 0 }, | |
| // R2 Storage quota tracking (bytes used out of 45 MB) | |
| storageUsedBytes: { type: Number, default: 0 }, | |
| // Role and status | |
| isAdmin: { type: Boolean, default: false }, | |
| isBanned: { type: Boolean, default: false }, | |
| }); | |
| module.exports = mongoose.model('User', UserSchema); | |