This repository has been archived on 2025-12-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
qmi-cloud/qmi-cloud-common/models/Snapshot.js
Manuel Romero 4d2b33cde6 snap creation
2025-02-10 23:56:22 +01:00

35 lines
662 B
JavaScript

const mongoose = require('mongoose');
const schema = new mongoose.Schema({
resourceID: {
type: String
},
name: {
type: String
},
targetRg: {
type: String
},
created: {
type: Date,
default: Date.now,
index : true
},
status: {
type: String,
default: "created" //copy.init //copy.finished
},
provision: {
type: mongoose.Types.ObjectId,
ref: 'Provision',
index : true
},
owner: {
type: mongoose.Types.ObjectId,
ref: 'User',
index : true
}
});
module.exports = mongoose.model('Snaphot', schema)