AgileVentures / AgileVentures/asyncvoter-api
Story schema definition
- Lingua principale
- JavaScript
- Stelle
- 5
- Fork
- 7
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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.)
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.