DoraCMS/models/Ads.js

28 lines
629 B
JavaScript
Raw Normal View History

2015-08-15 20:47:42 +08:00
/**
* Created by Administrator on 2015/4/15.
* 广告管理
*/
var mongoose = require('mongoose');
var shortid = require('shortid');
var Schema = mongoose.Schema;
var ads = new Schema({
_id: {
type: String,
unique: true,
'default': shortid.generate
},
mkey : String, //广告位标识
title: String,
category: String,
state : {type : Boolean , default :true},
type: { type: String, default: "0" }, // 展示形式 0文字 1图片
date: { type: Date, default: Date.now },
content: String // 内容
});
var Ads = mongoose.model("Ads",ads);
module.exports = Ads;