AdsItems.js 696 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Created by Administrator on 2015/4/15.
  3. * 广告管理,广告单元
  4. */
  5. var mongoose = require('mongoose');
  6. var shortid = require('shortid');
  7. var Schema = mongoose.Schema;
  8. var AdsItemsSchema = new Schema({
  9. _id: {
  10. type: String,
  11. unique: true,
  12. 'default': shortid.generate
  13. },
  14. title: String,
  15. link : String, // 广告链接
  16. width : Number,
  17. height : Number,
  18. target : {type : String, default : '_blank'},
  19. sImg : String , // 图片路径
  20. date: { type: Date, default: Date.now },
  21. alt: String // 广告alt标识
  22. });
  23. var AdsItems = mongoose.model("AdsItems",AdsItemsSchema);
  24. module.exports = AdsItems;