mirror of
https://gitee.com/doramart/DoraCMS.git
synced 2024-12-05 13:48:02 +08:00
28 lines
629 B
JavaScript
28 lines
629 B
JavaScript
|
/**
|
||
|
* 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;
|
||
|
|