35 lines
524 B
JavaScript
35 lines
524 B
JavaScript
const mongoose = require("mongoose");
|
|
|
|
const Schema = mongoose.Schema;
|
|
|
|
const deviceSchema = new Schema({
|
|
device_name: {
|
|
type: String,
|
|
unique: true
|
|
},
|
|
device_type: {
|
|
type: String
|
|
},
|
|
manifactor: {
|
|
type: String
|
|
},
|
|
serial_number: {
|
|
type: String,
|
|
unique: true
|
|
},
|
|
model: {
|
|
type: String
|
|
},
|
|
firmware_version: {
|
|
type: String
|
|
},
|
|
device_ip_address: {
|
|
type: String,
|
|
unique: true
|
|
}
|
|
});
|
|
|
|
const Device = mongoose.model("Device", deviceSchema);
|
|
|
|
module.exports = Device;
|