You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
1.9 KiB
87 lines
1.9 KiB
1 year ago
|
/* eslint-disable*/
|
||
|
'use strict';
|
||
|
|
||
|
module.exports = dc => {
|
||
|
const DataTypes = dc.ORM;
|
||
|
const sequelize = dc.orm;
|
||
|
const QrcodeFiles = sequelize.define("qrcodeFiles", {
|
||
|
id: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: null,
|
||
|
primaryKey: true,
|
||
|
field: "id",
|
||
|
autoIncrement: true,
|
||
|
},
|
||
|
fileName: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "文件名",
|
||
|
primaryKey: false,
|
||
|
field: "file_name",
|
||
|
autoIncrement: false,
|
||
|
},
|
||
|
fileSize: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "文件大小(byte)",
|
||
|
primaryKey: false,
|
||
|
field: "file_size",
|
||
|
autoIncrement: false,
|
||
|
},
|
||
|
fileUrl: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: false,
|
||
|
defaultValue: null,
|
||
|
comment: "文件存储链接",
|
||
|
primaryKey: false,
|
||
|
field: "file_url",
|
||
|
autoIncrement: false,
|
||
|
},
|
||
|
previewImgUrl: {
|
||
|
type: DataTypes.STRING,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "文件预览图链接",
|
||
|
primaryKey: false,
|
||
|
field: "preview_img_url",
|
||
|
autoIncrement: false,
|
||
|
},
|
||
|
qrcodeId: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "关联二维码ID",
|
||
|
primaryKey: false,
|
||
|
field: "qrcode_id",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
model: "qrcode",
|
||
|
key: "id"
|
||
|
}
|
||
|
},
|
||
|
publicityInfoId: {
|
||
|
type: DataTypes.INTEGER,
|
||
|
allowNull: true,
|
||
|
defaultValue: null,
|
||
|
comment: "关联宣传信息ID",
|
||
|
primaryKey: false,
|
||
|
field: "publicity_info_id",
|
||
|
autoIncrement: false,
|
||
|
references: {
|
||
|
model: "publicity_info",
|
||
|
key: "id"
|
||
|
}
|
||
|
},
|
||
|
}, {
|
||
|
tableName: "qrcode_files",
|
||
|
comment: "",
|
||
|
indexes: []
|
||
|
});
|
||
|
|
||
|
dc.models.QrcodeFiles = QrcodeFiles;
|
||
|
return QrcodeFiles;
|
||
|
};
|