Skip to content

Claim Draft objects

Iain J McCallum edited this page Sep 26, 2015 · 1 revision
var claimSchema = mongoose.Schema({
    description: {
        type: String,
        default: '',
        required: 'Please fill Statement name',
        trim: true
    },
    axiom: {
        type: Boolean,
        default: false
    },
    status: {
        type: Boolean,
        default: false
    },
    flags: {
        type: String,
    },
    supporting: [{
            status: {
                type: Boolean,
                defaut: false
            },
            reasons: [{
                    type: Schema.ObjectId,
                    ref: 'Claim',
                    default: []
            }]
    }],
    opposing: [{
            status: {
                type: Boolean,
                defaut: false
            },
            reasons: [{
                    type: Schema.ObjectId,
                    ref: 'Claim',
                    default: []
            }]
    }],
    usedIn: [{
            status: {
                type: Boolean,
                defaut: false
            },
            reasons: [{
                    type: Schema.ObjectId,
                    ref: 'Claim',
                    default: []
            }]
    }],
    meta: {
        author: {
            type: Schema.ObjectId,
            ref: 'User'
        },
        created: {
            type: Date,
            default: Date.now
        },
        published: {
            type: Date,
            default: Date.now
        },
        statusChangeCount: Number,
        viewCount: Number

    }
});

Clone this wiki locally