first commit
This commit is contained in:
34
models/device.model.js
Normal file
34
models/device.model.js
Normal file
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user