attachmentModel.js 921 字节
var  sequelize = require('../config');
var Sequelize = require('sequelize');
var uuid = require('../util/UuidUtil')


var  attachment = sequelize.define('3m_attachment', {
    id: {
        type: Sequelize.STRING(32),
        defaultValue:uuid.db32(),
        allowNull: false,
        unique: true,
        primaryKey: true,
        field: "id"
    },
    siteId: {
        allowNull: false,        
        type: Sequelize.STRING(32),
        field: "site_id"
    },
    businessId: {
        allowNull: false,        
        type: Sequelize.STRING(32),
        field: "business_id"
    },
    category: {
        allowNull: false,        
        type:Sequelize.INTEGER(10),
        field: "category"
    },
    path: {
        allowNull: false,        
        type:Sequelize.STRING(255),
        field: "path"
    }
}, {
        timestamps: false,
        freezeTableName: true
    });

module.exports = attachment;