mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
17 lines
421 B
JavaScript
17 lines
421 B
JavaScript
var mongoose = require('mongoose'),
|
|
Schema = mongoose.Schema,
|
|
ObjectId = Schema.ObjectId;
|
|
|
|
var ReplySchema = new Schema({
|
|
content: {type: String},
|
|
topic_id: {type: ObjectId, index:true},
|
|
author_id: {type: ObjectId},
|
|
reply_id : {type: ObjectId},
|
|
create_at: {type: Date, default: Date.now},
|
|
update_at: {type: Date, default: Date.now},
|
|
|
|
content_is_html: {type: Boolean}
|
|
});
|
|
|
|
mongoose.model('Reply', ReplySchema);
|