-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create the
artStatus
column for design notes (#9)
* Remove ```expirationAt``` for database entries * add index syncing * Create the ```artIn``` column for design notes * Add ```artStatus``` dropdown for design notes * Update designNotes.js
- Loading branch information
Showing
6 changed files
with
47 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
const mongoose = require('mongoose'); | ||
|
||
const EXPIRATION = 2; | ||
// const EXPIRATION = 2; | ||
|
||
const designNoteSchema = mongoose.Schema({ | ||
section: { type: String }, | ||
placement: { type: String }, | ||
slug: { type: String }, | ||
art: { type: String }, | ||
comments: { type: String }, | ||
date: { type: Date }, | ||
section: { type: String, default: "" }, | ||
placement: { type: String, default: "" }, | ||
slug: { type: String, default: "" }, | ||
art: { type: String, default: "" }, | ||
artStatus: { type: String, default: "" }, | ||
comments: { type: String, default: "" }, | ||
date: { type: Date, defautl: Date.now }, | ||
// You would think this would be a number | ||
// but people often approximate or give | ||
// ranges so | ||
wordCount: { type: String }, | ||
status: { type: String }, | ||
referText: { type: String }, | ||
// expireAt: { | ||
// type: Date, | ||
// default: function () { | ||
// const now = new Date(); | ||
// now.setDate(now.getDate() + EXPIRATION) | ||
// return now; | ||
// } | ||
// } | ||
wordCount: { type: String, default: "" }, | ||
status: { type: String, default: "" }, | ||
referText: { type: String, default: "" }, | ||
}, { timestamps: true, strict: false }); | ||
// designNoteSchema.index({ expireAt: 1 }, { expireAfterSeconds: 0 }); | ||
|
||
let DesignNote = mongoose.model('DesignNote', designNoteSchema); | ||
module.exports = DesignNote; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters