Update compiler and task schema

parent 972d2b44
...@@ -11,6 +11,9 @@ const CompilerSchema = new mongoose.Schema({ ...@@ -11,6 +11,9 @@ const CompilerSchema = new mongoose.Schema({
type: String, type: String,
required: true required: true
}, },
languageTheme: {
type: String
},
isProject: { isProject: {
type: Boolean, type: Boolean,
required: true required: true
......
...@@ -67,16 +67,26 @@ const TaskSchema = new mongoose.Schema({ ...@@ -67,16 +67,26 @@ const TaskSchema = new mongoose.Schema({
error: {type: Boolean, default: true} error: {type: Boolean, default: true}
}, },
compilers: { compilers: {
type: [{ type: Map,
compiler: { of: {
patternFile: {
type: mongoose.Schema.Types.ObjectId
},
sampleFile: {
type: mongoose.Schema.Types.ObjectId
},
compileFile: {
type: mongoose.Schema.Types.ObjectId
},
arguments: {
type: String, type: String,
required: true required: true
}, },
arguments: { compileProjectFileName: {
type: String type: String,
} }
}], },
default: [] default: {}
}, },
cpuTimeLimit: { cpuTimeLimit: {
type: Number, type: Number,
...@@ -86,19 +96,6 @@ const TaskSchema = new mongoose.Schema({ ...@@ -86,19 +96,6 @@ const TaskSchema = new mongoose.Schema({
type: String, type: String,
default: '64K' default: '64K'
}, },
compileFile: {
type: mongoose.Schema.Types.ObjectId,
refs: 'fs'
},
compileProjectFileName: {
type: String,
},
patternFile: {
type: mongoose.Schema.Types.ObjectId
},
sampleFile: {
type: mongoose.Schema.Types.ObjectId
},
testingType: { testingType: {
type: String, type: String,
default: defines.TESTER_TYPE.TEXT_COMPARE default: defines.TESTER_TYPE.TEXT_COMPARE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment