Download src/models/ProjectBandwidths.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 798 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/main/src/models/ProjectBandwidths.ts
- Command line
-
hf download hf://spaces/lynfera/api/src/models/ProjectBandwidths.ts
-
curl -L -o ProjectBandwidths.ts https://huggingface.co/spaces/lynfera/api/resolve/main/src/models/ProjectBandwidths.ts
798 Bytes
| import mongoose, { Document, Schema, Types } from "mongoose"; | |
| export interface IProjectBandwiths extends Document { | |
| _id: string; | |
| user: Types.ObjectId; | |
| project: Types.ObjectId; | |
| currentMonth: string; | |
| bandwidthMonthly: number; | |
| bandwidthTotal: number; | |
| createdAt: Date; | |
| updatedAt: Date; | |
| } | |
| const projectBandwidthsSchema = new Schema<IProjectBandwiths>( | |
| { | |
| user: { type: Schema.Types.ObjectId, ref: "User", required: true }, | |
| project: { type: Schema.Types.ObjectId, ref: "Project", required: true }, | |
| currentMonth: { type: String, default: "" }, | |
| bandwidthMonthly: { type: Number, default: 0 }, | |
| bandwidthTotal: { type: Number, default: 0 }, | |
| }, | |
| { | |
| timestamps: true, | |
| }, | |
| ); | |
| export const ProjectBandwidth = mongoose.model<IProjectBandwiths>("ProjectBandwidth", projectBandwidthsSchema); | |