mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-06 00:45:55 +02:00
add many fields for torrents about
This commit is contained in:
@@ -69,10 +69,12 @@ var UserSchema = new Schema({
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
index: {
|
||||
unique: true,
|
||||
sparse: true // For this to work on a previously indexed field, the index must be dropped & the application restarted.
|
||||
},
|
||||
//index: {
|
||||
// unique: true,
|
||||
// sparse: true // For this to work on a previously indexed field, the index must be dropped & the application restarted.
|
||||
//},
|
||||
unique: 'email already exists',
|
||||
required: 'Please fill in a email address',
|
||||
lowercase: true,
|
||||
trim: true,
|
||||
default: '',
|
||||
@@ -108,9 +110,17 @@ var UserSchema = new Schema({
|
||||
type: String,
|
||||
enum: ['user', 'admin']
|
||||
}],
|
||||
default: ['user'],
|
||||
default: ['admin'],
|
||||
required: 'Please provide at least one role'
|
||||
},
|
||||
uploaded: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
downloaded: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
updated: {
|
||||
type: Date
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user