Spaces:
Paused
Paused
| import mongoose from "mongoose"; | |
| const fileSchema = new mongoose.Schema({ | |
| fileId: { type: String, required: true, unique: true }, | |
| path: String, | |
| originalName: String, | |
| sender: String, | |
| senderId: String, | |
| recipient: String, | |
| message: String, | |
| codeHash: String, | |
| downloadedAt: Date, | |
| expiresAt: Date, | |
| }, { timestamps: true }); | |
| export default mongoose.model("File", fileSchema); |