mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
12 lines
279 B
JavaScript
12 lines
279 B
JavaScript
var mongoose = require('mongoose'),
|
|
Schema = mongoose.Schema,
|
|
ObjectId = Schema.ObjectId;
|
|
|
|
var RelationSchema = new Schema({
|
|
user_id: {type: ObjectId},
|
|
follow_id: {type: ObjectId},
|
|
create_at: {type: Date, default: Date.now}
|
|
});
|
|
|
|
mongoose.model('Relation', RelationSchema);
|