attachmentModel.js
921 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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;