AgileVentures / AgileVentures/asyncvoter-api
Story schema definition
- 主要言語
- JavaScript
- スター
- 5
- フォーク
- 7
- PR マージ指標
- PR 指標を取得中
説明
Currently the schema for the Story model provides no actual identifiers or constraints. It is defined as such:
``` js
var mongoose = require('mongoose');
var schema = new mongoose.Schema({
name: 'string',
size: 'string',
url: 'string'
});
var Story = mongoose.model('Story', schema);
module.exports = Story;`
```
In my local version I've redefined it as:
``` js
var mongoose = require('mongoose');
var storySchema = new mongoose.Schema({
name: {
type: String,
required: true,
unique: true // <-- Really?
}
size: String,
url: {
type: String,
required: true,
unique: true // <-- Identifier
}
});
var Stories = mongoose.model('Story', storySchema);
module.exports = Stories;
```
Questions: AFAIK, the URL should be unique, however should the name really be unique? Can one issue be voted on multiple times? (E.g. to address further technical concerns/requirements rather than user ones.)
コントリビューションガイド
評価
この issue はまだ評価されていません。