mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
38 lines
619 B
JavaScript
38 lines
619 B
JavaScript
import { model, Schema } from 'mongoose'
|
|
|
|
const Command = model(
|
|
'Command',
|
|
new Schema(
|
|
{
|
|
session: {
|
|
type: Schema.ObjectId,
|
|
ref: 'Session',
|
|
required: true,
|
|
},
|
|
pwd: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
command: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
output: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
error: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
stage: {
|
|
type: String,
|
|
required: false,
|
|
},
|
|
},
|
|
{ timestamps: true }
|
|
)
|
|
)
|
|
|
|
export default Command
|