var shortid = require('shortid');

module.exports = {
  identity: 'document',
  connection: 'pizzaDB',
  attributes: {
    id: {
      type: 'string',
      primaryKey: true,
      unique: true,
      defaultsTo: function() {
        return shortid.generate();
      }
    },
    doc_name: {
      type : 'string',
      unique: true,
      required : true
    },
    file: {
      type : 'string',
      required : false
    },
     link: {
      type : 'string',
      required : false
    },
    documentowner:{
    model:'asset'
    }
  }
};