Sha256: 76c82932090f01fe74cbc0811af43df457428a07ffc8c85f13b1bd1bccdbbc6b

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

/**
 * Defines comment schema and connects to database
 */
Comment = mongoose.model('Comment', new mongoose.Schema({
    sdk:         String,
    version:     String,

    action:      String,
    author:      String,
    userId:      Number,
    content:     String,
    contentHtml: String,
    createdAt:   Date,
    downVotes:   Array,
    emailHash:   String,
    rating:      Number,
    target:      Array,
    upVotes:     Array,
    deleted:     Boolean,
    updates:     Array,
    mod:         Boolean,
    title:       String,
    url:         String
}));

Subscription = mongoose.model('Subscription', new mongoose.Schema({
    sdk:         String,
    version:     String,

    createdAt:   Date,
    userId:      Number,
    email:       String,
    target:      Array
}));

Meta = mongoose.model('Meta', new mongoose.Schema({
    sdk:         String,
    version:     String,

    createdAt:   Date,
    userId:      Number,
    commentId:   String,
    metaType:    String
}));

mongoose.connect(config.mongoDb);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jsduck-3.8.2 opt/comments-server-side/database.js