vs-mongo-mart

ActiveTicket

uses

schema

{
    id: { type: String, default: '' },
    ref: { type: Object, default: {} },
    status: { type: String, default: 'active' },  // active, archived, invoice,
    techs: { type: Array, default: [] },
    custid: {type:String, default:''},
    cat:{type:String,default:''},
    dept:{type:String,default:''},
    hhid:{type:String,default:''},

    ...aaddress,
    documents: { type: Array, default: [] },

    checks: { type: Array, default: [] },
    conform: { type: Object, default: {} },
    contract: { type: Object, default: {} },
    final: { type: Object, default: {} },
    repairs: { type: Array, default: [] },
    salesrep:{type:String,default:''},
    sitems: { type: Array, default: [] },
    wo: { type: Object, default: {} },
    todo:{type:Object, default: {}},
    office: { type: Object, default: {} },
    logs:{type:Array,default:[]}
}

CompleteTicket

uses

schema

{
    id: { type: String, default: '' },
    ref: { type: Object, default: {} },
    status: { type: String, default: 'active' },  // active, archived, invoice,
    techs: { type: Array, default: [] },
    custid: {type:String, default:''},
    cat:{type:String,default:''},
    dept:{type:String,default:''},
    hhid:{type:String,default:''},

    ...aaddress,
    documents: { type: Array, default: [] },

    checks: { type: Array, default: [] },
    conform: { type: Object, default: {} },
    contract: { type: Object, default: {} },
    final: { type: Object, default: {} },
    repairs: { type: Array, default: [] },
    salesrep:{type:String,default:''},
    sitems: { type: Array, default: [] },
    wo: { type: Object, default: {} },
    todo:{type:Object, default: {}},
    office: { type: Object, default: {} },
    logs:{type:Array,default:[]}
}

ClosedTicket

uses

schema

{
    id: { type: String, default: '' },
    ref: { type: Object, default: {} },
    status: { type: String, default: 'active' },  // active, archived, invoice,
    techs: { type: Array, default: [] },
    custid: {type:String, default:''},
    cat:{type:String,default:''},
    dept:{type:String,default:''},
    hhid:{type:String,default:''},

    ...aaddress,
    documents: { type: Array, default: [] },

    checks: { type: Array, default: [] },
    conform: { type: Object, default: {} },
    contract: { type: Object, default: {} },
    final: { type: Object, default: {} },
    repairs: { type: Array, default: [] },
    salesrep:{type:String,default:''},
    sitems: { type: Array, default: [] },
    wo: { type: Object, default: {} },
    todo:{type:Object, default: {}},
    office: { type: Object, default: {} },
    logs:{type:Array,default:[]}
}

Spiff

schema

{
    FormID: { type: String, default: '' },
    TechID: { type: String, default: '' },
    TechLName: { type: String, default: '' },
    TechFName: { type: String, default: '' },
    Date: { type: Date, default: '' },
    WO: { type: String, default: '' },
    Address: { type: String, default: '' },
    CustLName: { type: String, default: '' },
    CustFName: { type: String, default: '' },
    ReferTo: { type: String, default: '' },
    SpiffFor: { type: String, default: '' },
    status: { type: String, default: '' },
    paid: { type: String, default: '' },
    comments: { type: Array, default: [] },
    closedate: { type: Date, default: '' },
    reportmonth: { type: String, default: '' },
    reportid: { type: String, default: '' },
    lastdate: { type: Date, default: '' },
    editor: { type: Array, defualt: [] },
    reportStatus: { type: String, deafult: '' }
}

SpiffReport

schema

{
    id: { type: String, default: '' },
    cleaned: { type: Boolean, default: false },
    comInfo: {
        type: Object, default: {
            lost: 0,
            approved: 0,
            commission: 0,
            open: 0,
            submitted: 0
        }
    },
    document: { type: Object, default: {} },
    spiffTypes: { type: Object, default: {} },
    closedate: { type: Date, default: '' },
    month: { type: String, default: '' },
    runner: { type: String, default: '' },
    techs: { type: Object, default: {} }
}