26 lines
1.4 KiB
JavaScript
26 lines
1.4 KiB
JavaScript
const mongoose = require('mongoose'),
|
|
Schema = mongoose.Schema;
|
|
|
|
const schema = new Schema({
|
|
appId: { type: Schema.Types.ObjectId, ref: 'Application', required: true },
|
|
name: { type: String, required: true },
|
|
agn: { type: String, required: true },
|
|
meta: { type: Schema.Types.Mixed }, // Store fields read from corresponding q/q*.t* file
|
|
data: { type: Schema.Types.Mixed }, // Store sprayed segment numeric arrays
|
|
|
|
totalSprLength: { type: Number, required: false }, // always in meter(s), use for SATLOG exported spray data file .asc only
|
|
|
|
totalTurnTime: { type: Number, required: false }, // always in seconds
|
|
totalSprayTime: { type: Number, required: false }, // always in seconds
|
|
totalFlightTime: { type: Number, required: false }, // always in seconds
|
|
|
|
totalSprayed: { type: Number, required: false }, // always in hectare(s)
|
|
totalSprayMat: { type: Number, required: false }, // Total Sprayed material amount. Always in metric (L/Ha or Kg/Ha)
|
|
// RateUnits: 0: oz/ac, 1: gal/ac, 2: lbs/ac, 3: L/ha, 4: Kg/ha
|
|
totalSprayMatUnit: { type: Number, required: false }, // 3: L/ha or 4: Kg/ha
|
|
note: { type: String }, // Record notes or errors found while processing the file
|
|
markedDelete: { type: Boolean, default: false }
|
|
});
|
|
|
|
module.exports = mongoose.model('AppFile', schema);
|