mirror of
https://github.com/moghtech/komodo.git
synced 2026-07-16 13:57:11 -05:00
14 lines
378 B
TypeScript
14 lines
378 B
TypeScript
import { Server } from "@monitor/types";
|
|
import { model, Schema } from "mongoose";
|
|
|
|
export default function serverModel() {
|
|
const schema = new Schema<Server>({
|
|
name: { type: String, unique: true },
|
|
address: String,
|
|
enabled: { type: Boolean, default: true },
|
|
isCore: Boolean,
|
|
owners: { type: [String], default: [] }
|
|
});
|
|
|
|
return model("Server", schema);
|
|
} |