mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Adds Tag Model that will be apply to different models.
This commit is contained in:
@@ -30,27 +30,6 @@ const StatusSchema = new Schema({
|
||||
_id: false
|
||||
});
|
||||
|
||||
/**
|
||||
* The Mongo schema for a Comment Tag.
|
||||
* @type {Schema}
|
||||
*/
|
||||
const TagSchema = new Schema({
|
||||
name: String,
|
||||
|
||||
// The User ID of the user that assigned the status.
|
||||
assigned_by: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
|
||||
created_at: {
|
||||
type: Date,
|
||||
default: Date
|
||||
}
|
||||
}, {
|
||||
_id: false
|
||||
});
|
||||
|
||||
/**
|
||||
* The Mongo schema for a Comment.
|
||||
* @type {Schema}
|
||||
@@ -74,7 +53,6 @@ const CommentSchema = new Schema({
|
||||
enum: STATUSES,
|
||||
default: 'NONE'
|
||||
},
|
||||
tags: [TagSchema],
|
||||
parent_id: String,
|
||||
|
||||
// Additional metadata stored on the field.
|
||||
|
||||
Reference in New Issue
Block a user