Files
node-session-server/src/models/SessionServer.ts
T

56 lines
905 B
TypeScript

import { model, Schema } from "mongoose";
const sessionServerSchema = new Schema(
{
location: {
type: String,
},
name: {
type: String,
},
type: {
type: String,
},
hostname: {
type: String,
unique: true,
},
gpuMemoryTotal: {
type: Number,
},
gpuMemoryUsed: {
type: Number,
},
gpuUtilization: {
type: Number,
},
cpuUtilization: {
type: Number,
},
ramTotal: {
type: Number,
},
ramUsed: {
type: Number,
},
localIP: {
type: String,
},
networkDownloadSpeed: {
type: Number,
},
networkUploadSpeed: {
type: Number,
},
},
{
timestamps: true,
toJSON: { virtuals: true },
toObject: { virtuals: true },
}
);
const SessionServer = model("Session_Server", sessionServerSchema);
export default SessionServer;