|
|
@@ -2,7 +2,6 @@ module.exports = function(crowi) {
|
|
|
var debug = require('debug')('crowi:models:userGroup')
|
|
|
, mongoose = require('mongoose')
|
|
|
, mongoosePaginate = require('mongoose-paginate')
|
|
|
- , uniqueValidator = require('mongoose-unique-validator')
|
|
|
, ObjectId = mongoose.Schema.Types.ObjectId
|
|
|
|
|
|
, USER_GROUP_PUBLIC_FIELDS = '_id image name createdAt'
|
|
|
@@ -14,11 +13,10 @@ module.exports = function(crowi) {
|
|
|
userGroupSchema = new mongoose.Schema({
|
|
|
userGroupId: String,
|
|
|
image: String,
|
|
|
- name: { type: String, required: true, unique: true },
|
|
|
+ name: { type: String, required: true },
|
|
|
createdAt: { type: Date, default: Date.now },
|
|
|
});
|
|
|
userGroupSchema.plugin(mongoosePaginate);
|
|
|
- userGroupSchema.plugin(uniqueValidator);
|
|
|
|
|
|
|
|
|
// TBD: グループ画像の更新
|