torrent_model.js - seedlinux - Torrent indexing tool opensource torrents with share ratio's etc.
 (HTM) git clone git://jay.scot/seedlinux
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
       torrent_model.js (637B)
       ---
            1 'use strict';
            2 
            3 const mongoose = require('mongoose');
            4 const Schema = mongoose.Schema;
            5 
            6 mongoose.Promise = global.Promise;
            7 
            8 const TorrentSchema = Schema(
            9   {
           10     name: {type: String, required: true, max: 100},
           11     hash: {type: String, required: true, max: 20},
           12     created: {type: String},
           13     comment: {type: String, max: 100},
           14     announce: [
           15       {type: String}
           16       ],  
           17     files: [{
           18       path: String,
           19       name: String,
           20       length: Number,
           21       offset: Number
           22     }],
           23     magneturi: {type: String},
           24     leechers: {type: Number},
           25     seeders: {type: Number}
           26 
           27   }
           28 );
           29 
           30 module.exports = mongoose.model('Torrent', TorrentSchema);