123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /**
- * 消息通知数据模型
- *
- * @author CaiAoLin
- * @date 2017/9/21
- * @version
- */
- // import mongoose from 'mongoose';
- let mongoose = require("mongoose");
- let Schema = mongoose.Schema;
- let collectionName = 'message';
- let modelSchema = {
- // 消息标题
- title: String,
- // 消息内容
- content: String,
- // 消息类型
- message_type: {
- type: Number,
- default: 1
- },
- // 消息状态
- status: {
- type: Number,
- default: 0
- },
- // 发布时间
- release_time: {
- type: Number,
- default: 0
- },
- // 创建时间
- create_time: Number,
- // 最后修改时间
- update_time: {
- type: Number,
- default: 0
- },
- // 创建者
- creator: String,
- // 发布者
- release_user: String,
- // 最后修改人
- last_update: {
- type: String,
- default: ''
- }
- };
- mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
|