mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
wip: replace packages with pure files
This commit is contained in:
1 parent
2d95ca382f
commit
87b8ca5d04
112 files changed
+740
-522
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { model, Schema, Types } from 'mongoose'
|
||||
|
||||
export interface ICommand {
|
||||
session: Types.ObjectId
|
||||
pwd: string
|
||||
command: string
|
||||
output?: string
|
||||
error?: string
|
||||
stage?: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
export const Command = model<ICommand>(
|
||||
'Command',
|
||||
new Schema<ICommand>(
|
||||
{
|
||||
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 }
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user